diff options
author | Leah Neukirchen <leah@vuxu.org> | 2017-08-29 17:42:22 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2017-08-29 17:42:22 +0200 |
commit | 1b13bb82c9a732cd9d7216e74dab45e782c4f207 (patch) | |
tree | e6b9573a818c1d6d5ebcde0495ea2430b10a5d14 | |
parent | 0f5eae045db3c1c146ebdf62eac77a10c2255baf (diff) | |
download | snooze-1b13bb82c9a732cd9d7216e74dab45e782c4f207.tar.gz snooze-1b13bb82c9a732cd9d7216e74dab45e782c4f207.tar.xz snooze-1b13bb82c9a732cd9d7216e74dab45e782c4f207.zip |
parse: always treat plain / as *, even if 0 is not a legal value
-rw-r--r-- | snooze.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) |