aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/utils.c b/src/utils.c
index 3e86f17..2ca35de 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -740,9 +740,11 @@ int parse_time(const char *string, unsigned *hour, unsigned *minute)
if (*p == ':') {
if ((++n) > 1)
return 0;
- } else if ((*p >= '0') && (*p <= '9'))
+ } else if ((*p >= '0') && (*p <= '9')) {
+ if ((n == 0) && (p == (string + 2)) && *(p + 1))
+ n++;
in[n] = in[n] * 10 + (int)(*p - '0');
- else
+ } else
return 0;
}