mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 19:29:16 +00:00
LibGUI: Fix null-termination of TextDocumentLine
This commit is contained in:
committed by
Andreas Kling
parent
0c7058aaa0
commit
0d17e3bfa6
@@ -118,7 +118,8 @@ void TextDocumentLine::set_text(TextDocument& document, const StringView& text)
|
||||
return;
|
||||
}
|
||||
m_text.resize((int)text.length() + 1);
|
||||
memcpy(m_text.data(), text.characters_without_null_termination(), text.length() + 1);
|
||||
memcpy(m_text.data(), text.characters_without_null_termination(), text.length());
|
||||
m_text.last() = 0;
|
||||
document.update_views({});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user