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
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}