diff options
Diffstat (limited to 'ifparser.c')
-rw-r--r-- | ifparser.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -338,7 +338,10 @@ parse_product(IfParser *g, const char *cp, long *valp) case '%': DO(cp = parse_product(g, cp + 1, &rightval)); - *valp = (*valp % rightval); + if (rightval) + *valp = (*valp % rightval); + else + *valp = LONG_MAX; break; } return cp; |