LibJS: Fix endless loop in string lexing

This commit is contained in:
Oriko 2020-03-13 23:07:47 +02:00 committed by Andreas Kling
commit 2d7f4bea90
Notes: sideshowbarker 2024-07-19 08:19:23 +09:00

View file

@ -205,7 +205,7 @@ Token Lexer::next()
token_type = TokenType::NumericLiteral; token_type = TokenType::NumericLiteral;
} else if (m_current_char == '"') { } else if (m_current_char == '"') {
consume(); consume();
while (m_current_char != '"') { while (m_current_char != '"' && !is_eof()) {
consume(); consume();
} }
consume(); consume();