Make eval_all exit when largest match is empty.
This commit is contained in:
parent
adcc97ef0b
commit
f83f0a1bcc
|
@ -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]){
|
||||
|
|
Loading…
Reference in New Issue
Block a user