Skip to content

Commit 79c7b57

Browse files
committed
Fix infinite parsing of string literal
1 parent cfa45f6 commit 79c7b57

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)