diff options
author | Mattias Andrée <maandree@kth.se> | 2016-12-01 14:48:11 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2016-12-01 14:48:11 +0100 |
commit | 306ee610d24a274f7e765898fbd760d274549388 (patch) | |
tree | 13ba58600e51a8464ba5748963e892a3a265c13d /src/cg-limits.c | |
parent | Check that the value of -p is proper (diff) | |
download | cg-tools-306ee610d24a274f7e765898fbd760d274549388.tar.gz cg-tools-306ee610d24a274f7e765898fbd760d274549388.tar.bz2 cg-tools-306ee610d24a274f7e765898fbd760d274549388.tar.xz |
Fix bugs
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | src/cg-limits.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cg-limits.c b/src/cg-limits.c index 78f0b6c..3f057bd 100644 --- a/src/cg-limits.c +++ b/src/cg-limits.c @@ -276,7 +276,7 @@ static int parse_double(double* restrict out, const char* restrict str) *out = strtod(str, &end); if (errno || isinf(*out) || isnan(*out) || *end) return -1; - if (!strchr("-0123456789.", *str)) + if (!*str || !strchr("-0123456789.", *str)) return -1; return 0; } |