mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-10-11 22:49:50 +00:00
Assembler: Fix crash from assembling malformed source
This commit is contained in:
@@ -369,11 +369,8 @@ std::string_view Lexer::CurrentLine() const
|
||||
size_t begin_index = line_index == 0 ? 0 : line_index - 1;
|
||||
for (; begin_index > 0; begin_index--)
|
||||
{
|
||||
if (m_lex_string[begin_index] == '\n')
|
||||
{
|
||||
begin_index++;
|
||||
if (m_lex_string[begin_index - 1] == '\n')
|
||||
break;
|
||||
}
|
||||
}
|
||||
size_t end_index = begin_index;
|
||||
for (; end_index < m_lex_string.size(); end_index++)
|
||||
|
||||
Reference in New Issue
Block a user