From 306ee610d24a274f7e765898fbd760d274549388 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 1 Dec 2016 14:48:11 +0100 Subject: Fix bugs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/cg-darkroom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cg-darkroom.c') diff --git a/src/cg-darkroom.c b/src/cg-darkroom.c index 03222a7..8d7d7fd 100644 --- a/src/cg-darkroom.c +++ b/src/cg-darkroom.c @@ -122,7 +122,7 @@ static int parse_double(double* restrict out, const char* restrict str) *out = strtod(str, &end); if (errno || (*out < 0) || isinf(*out) || isnan(*out) || *end) return -1; - if (!strchr("0123456789.", *str)) + if (!*str || !strchr("0123456789.", *str)) return -1; return 0; } -- cgit v1.2.3-70-g09d2