Skip to content

Commit 30ec697

Browse files
authored
Merge pull request #118 from filipsajdak/fsajdak-fix-infinite-paring-of-string-literal-on-eol
[FIX] Fix infinite loop while parsing of string literal when there is missing closing `"` character
2 parents cfa45f6 + 79c7b57 commit 30ec697

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/lex.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ auto lex_line(
403403
{ return u; }
404404
if (auto e = peek_is_escape_sequence(offset))
405405
{ return e; }
406-
if (peek(offset) != quote && peek(offset) != '\\')
406+
if (peek(offset) && peek(offset) != quote && peek(offset) != '\\')
407407
{ return 1; }
408408
return 0;
409409
};

0 commit comments

Comments
 (0)