mirror of
https://github.com/mawww/kakoune.git
synced 2024-12-02 23:21:15 +03:00
Fix String::resize not zero-terminating
This commit is contained in:
parent
e33ba455c8
commit
5378dabdec
@ -147,6 +147,7 @@ void String::resize(ByteCount size, char c)
|
|||||||
for (auto i = current_size; i < target_size; ++i)
|
for (auto i = current_size; i < target_size; ++i)
|
||||||
m_data.data()[i] = c;
|
m_data.data()[i] = c;
|
||||||
}
|
}
|
||||||
|
data()[target_size] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void String::Data::set_size(size_t size)
|
void String::Data::set_size(size_t size)
|
||||||
|
Loading…
Reference in New Issue
Block a user