diff --git a/src/eval.c b/src/eval.c index 8faa2ed..163401d 100644 --- a/src/eval.c +++ b/src/eval.c @@ -199,7 +199,7 @@ liblex_result eval_all(char* string, int index, eval_config* config, ll* matches if(new_match){ result = eval_word(string, index, config, new_match); if(result == LIBLEX_SUCCESS){ - if(new_match->pattern < 0){ + if(new_match->pattern < 0 || new_match->from - new_match->to == 0){ done = 1; free(new_match); if(string[index]){