diff --git a/src/compiler/lexer.c b/src/compiler/lexer.c index 466128bfd..94462170b 100644 --- a/src/compiler/lexer.c +++ b/src/compiler/lexer.c @@ -1783,6 +1783,8 @@ void lexer_init_with_file(Lexer *lexer, File *file) while ((c = *(check++)) != '\0') { if (c != 0xE2) continue; + unsigned char next = check[0]; + if (next == 0) break; unsigned char type = check[1]; switch (check[0]) {