Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
cron: Fix possible division by zero error
  • Loading branch information
perexg committed Sep 11, 2014
1 parent 26c778d commit 2051682
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cron.c
Expand Up @@ -73,7 +73,7 @@ cron_parse_field
if ((sn - off) >= bits || (en - off) >= bits || mn > bits)
return 1;
if (en < 0) en = sn;
if (mn < 0) mn = 1;
if (mn <= 0) mn = 1;
while (sn <= en) {
if ( (sn % mn) == 0 )
val |= (0x1ULL << (sn - off));
Expand Down

0 comments on commit 2051682

Please sign in to comment.