1
0
Fork 0
mirror of https://github.com/pygos/cron synced 2024-12-22 01:10:49 +01:00

Fix: mnemonic comparison in readnum

- compare the current mneonic in loop, not the first one
 - don't invert comparison

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
David Oberhollenzer 2018-11-24 13:30:02 +01:00
parent d2b3a983e1
commit 1d6b5e58ab

View file

@ -115,7 +115,7 @@ static char *readnum(char *line, int *out, int minval, int maxval,
line[i] = '\0'; line[i] = '\0';
for (ev = mnemonic; ev->name != NULL; ++ev) { for (ev = mnemonic; ev->name != NULL; ++ev) {
if (!strcmp(line, mnemonic->name) == 0) if (strcmp(line, ev->name) == 0)
break; break;
} }