diff --git a/src/eval.c b/src/eval.c index 9e51176..8faa2ed 100644 --- a/src/eval.c +++ b/src/eval.c @@ -169,8 +169,8 @@ liblex_result eval_word(char* string, int index, eval_config* config, match* mtc result = foreach_errors[ll_foreach(&config->states, NULL, compare_always, _eval_foreach_add_node, evl.set_current)]; if(result == LIBLEX_SUCCESS){ do { - _eval_step(&evl); - } while(evl.matched && *(evl.string)); + result = _eval_step(&evl); + } while(result == LIBLEX_SUCCESS && evl.matched && *(evl.string)); } if(result == LIBLEX_SUCCESS && evl.matches.tail){