Fix eval.c to use return code from eval_step.

This commit is contained in:
Danila Fedorin 2017-03-18 21:22:21 -07:00
parent d808f98fd3
commit adcc97ef0b

View File

@ -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)]; result = foreach_errors[ll_foreach(&config->states, NULL, compare_always, _eval_foreach_add_node, evl.set_current)];
if(result == LIBLEX_SUCCESS){ if(result == LIBLEX_SUCCESS){
do { do {
_eval_step(&evl); result = _eval_step(&evl);
} while(evl.matched && *(evl.string)); } while(result == LIBLEX_SUCCESS && evl.matched && *(evl.string));
} }
if(result == LIBLEX_SUCCESS && evl.matches.tail){ if(result == LIBLEX_SUCCESS && evl.matches.tail){