From 1b13bb82c9a732cd9d7216e74dab45e782c4f207 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Tue, 29 Aug 2017 17:42:22 +0200 Subject: parse: always treat plain / as *, even if 0 is not a legal value --- snooze.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/snooze.c b/snooze.c index f37c42a..9a3381a 100644 --- a/snooze.c +++ b/snooze.c @@ -113,7 +113,8 @@ parse(char *expr, char *buf, long bufsiz, int offset) case '/': s++; n0 = n; - n = parse_int(&s, -offset, bufsiz); + if (*s) + n = parse_int(&s, -offset, bufsiz); if (n == 0) // / = * n = 1; for (i = n0; i < bufsiz; i += n) -- cgit v1.2.3