mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
StringView: Rename characters() to characters_without_null_termination().
This should make you think twice before trying to use the const char* from a StringView as if it's a null-terminated string.
This commit is contained in:
@@ -21,7 +21,7 @@ void StringBuilder::append(const StringView& str)
|
||||
if (str.is_empty())
|
||||
return;
|
||||
will_append(str.length());
|
||||
memcpy(m_buffer.pointer() + m_length, str.characters(), str.length());
|
||||
memcpy(m_buffer.pointer() + m_length, str.characters_without_null_termination(), str.length());
|
||||
m_length += str.length();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user