summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2020-03-28 19:53:19 +1100
committerMaxime Coste <mawww@kakoune.org>2020-03-29 20:28:56 +1100
commitb42885ef71e73a5af4f45c69aaeb63e6890dfa3b (patch)
tree9c4a042a701fcaae80eba6fe517592b1daef24ce /src
parent8f30e37507b524228b22bdfba458cbdd22cc8007 (diff)
Fix empty strings not being zero terminated
Diffstat (limited to 'src')
-rw-r--r--src/string.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string.hh b/src/string.hh
index e69be344..56771c65 100644
--- a/src/string.hh
+++ b/src/string.hh
@@ -204,7 +204,7 @@ public:
private:
void release();
- void set_empty() { s.size = 1; }
+ void set_empty() { s.size = 1; s.string[0] = 0; }
void set_short(const char* data, size_t size);
};