From e6b93ce79a70d6629ac9accccb64e29620785b9f Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 2 Oct 2018 18:57:21 +0200 Subject: [PATCH] reset state when we meet the NEXT command. --- src/orderfile.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/orderfile.c b/src/orderfile.c index ff19014ea..8fdc75485 100644 --- a/src/orderfile.c +++ b/src/orderfile.c @@ -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);