aboutsummaryrefslogtreecommitdiffstats
path: root/src/cg-sleepmode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cg-sleepmode.c')
-rw-r--r--src/cg-sleepmode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cg-sleepmode.c b/src/cg-sleepmode.c
index 42fea0d..c4a41e6 100644
--- a/src/cg-sleepmode.c
+++ b/src/cg-sleepmode.c
@@ -178,7 +178,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;
}