reset state when we meet the NEXT command.

This commit is contained in:
Enno Rehling 2018-10-02 18:57:21 +02:00
parent eed3ab3acf
commit e6b93ce79a
1 changed files with 9 additions and 0 deletions

View File

@ -301,6 +301,15 @@ static void handle_order(void *userData, const char *str) {
handle_unit(userData, no);
}
}
else if (p == P_NEXT) {
state->f = NULL;
state->u = NULL;
state->next_order = NULL;
}
else if (p == P_REGION) {
state->u = NULL;
state->next_order = NULL;
}
else if (state->u) {
unit * u = state->u;
order * ord = parse_order(str, lang);