diff options
| author | Maxime Coste <mawww@kakoune.org> | 2019-11-17 09:50:18 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2019-11-17 09:50:18 +1100 |
| commit | 5378dabdecccd3158f9bb317499ece365563650b (patch) | |
| tree | 23917180fdfa7c07c28fc954c6a15532b096f1ce /src/string.cc | |
| parent | e33ba455c867fabd671d9fd7c883ff65ed632e5d (diff) | |
Fix String::resize not zero-terminating
Diffstat (limited to 'src/string.cc')
| -rw-r--r-- | src/string.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/string.cc b/src/string.cc index d44963ba..b5f04f29 100644 --- a/src/string.cc +++ b/src/string.cc @@ -147,6 +147,7 @@ void String::resize(ByteCount size, char c) for (auto i = current_size; i < target_size; ++i) m_data.data()[i] = c; } + data()[target_size] = 0; } void String::Data::set_size(size_t size) |
