Bugfix: Don’t increment 'walk' before checking it (Thanks MasterofJOKers)

This commit is contained in:
Michael Stapelberg 2012-01-19 19:01:47 +00:00
parent fd8e1c98c9
commit a2823d3aeb
1 changed files with 1 additions and 1 deletions

View File

@ -287,7 +287,6 @@ char *parse_command(const char *input) {
DLOG("checking for the end token.\n"); DLOG("checking for the end token.\n");
if (*walk == '\0' || *walk == ',' || *walk == ';') { if (*walk == '\0' || *walk == ',' || *walk == ';') {
DLOG("yes, indeed. end\n"); DLOG("yes, indeed. end\n");
walk++;
next_state(token); next_state(token);
token_handled = true; token_handled = true;
/* To make sure we start with an appropriate matching /* To make sure we start with an appropriate matching
@ -299,6 +298,7 @@ char *parse_command(const char *input) {
if (*walk == '\0' || *walk == ';') if (*walk == '\0' || *walk == ';')
cmd_criteria_init(&current_match); cmd_criteria_init(&current_match);
#endif #endif
walk++;
break; break;
} }
} }