mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-05 22:52:10 +02:00
LibJS: Add a specific test for invalid unicode characters in the lexer
Also fixes that it tried to make substrings past the end of the source if we overran the source length.
This commit is contained in:
@@ -145,7 +145,7 @@ void Lexer::consume()
|
||||
return false;
|
||||
m_eof = true;
|
||||
m_current_char = '\0';
|
||||
m_position++;
|
||||
m_position = m_source.length() + 1;
|
||||
m_line_column++;
|
||||
return true;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user