Browse Source

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>
master
David Oberhollenzer 4 years ago
parent
commit
1d6b5e58ab
  1. 2
      rdcron.c

2
rdcron.c

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

Loading…
Cancel
Save