From 45ed69c9f017532a3c29b41e496f71e6f24a8a49 Mon Sep 17 00:00:00 2001 From: Allen Webster Date: Sat, 24 Sep 2016 16:58:05 -0400 Subject: [PATCH] Fixed nasty crashing bug in the 4.0.11 branch --- 4cpp_lexer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/4cpp_lexer.h b/4cpp_lexer.h index 1ce4134d..1a96bbe1 100644 --- a/4cpp_lexer.h +++ b/4cpp_lexer.h @@ -799,7 +799,7 @@ cpp_lex_nonalloc_null_end_no_limit(Cpp_Lex_Data *S_ptr, char *chunk, int32_t siz break; } - if (chunk[S.pos-1] == 0){ + if (S.pos > S.chunk_pos && chunk[S.pos-1] == 0){ --S.pos; }