summaryrefslogtreecommitdiff
path: root/src/timeout.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/timeout.c')
-rw-r--r--src/timeout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/timeout.c b/src/timeout.c
index 9c31df529..462ef6b81 100644
--- a/src/timeout.c
+++ b/src/timeout.c
@@ -314,7 +314,7 @@ parse_duration (const char* str)
double duration;
const char *ep;
- if (!xstrtod (str, &ep, &duration, c_strtod)
+ if (! (xstrtod (str, &ep, &duration, c_strtod) || errno == ERANGE)
/* Nonnegative interval. */
|| ! (0 <= duration)
/* No extra chars after the number and an optional s,m,h,d char. */