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-gamma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cg-gamma.c') diff --git a/src/cg-gamma.c b/src/cg-gamma.c index b72cd21..d44b761 100644 --- a/src/cg-gamma.c +++ b/src/cg-gamma.c @@ -217,7 +217,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