diff --git a/src/eval.c b/src/eval.c index fa61eb3..9e51176 100644 --- a/src/eval.c +++ b/src/eval.c @@ -209,7 +209,7 @@ liblex_result eval_all(char* string, int index, eval_config* config, ll* matches result = ll_append(matches, new_match) == LIBDS_SUCCESS ? LIBLEX_SUCCESS : LIBLEX_MALLOC; } } - if(result == LIBLEX_SUCCESS){ + if(result == LIBLEX_SUCCESS && string[index] != '\0'){ index += new_match->to - new_match->from; } } else {