mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:57:35 +00: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:
parent
962298b040
commit
ac2c3a73b1
4 changed files with 83 additions and 1 deletions
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue