From b42885ef71e73a5af4f45c69aaeb63e6890dfa3b Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 28 Mar 2020 19:53:19 +1100 Subject: [PATCH] Fix empty strings not being zero terminated --- src/string.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); };