From 90cb51110d0680f997709c28f5a4593749707961 Mon Sep 17 00:00:00 2001 From: Noel Berry Date: Mon, 5 Dec 2022 20:03:46 -0800 Subject: [PATCH] small fix to previous string commit --- include/blah_string.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/blah_string.h b/include/blah_string.h index 9554b1b..9d0125f 100644 --- a/include/blah_string.h +++ b/include/blah_string.h @@ -140,6 +140,7 @@ namespace Blah m_heap_buffer.erase(new_length, s_len() - new_length); else m_stack_buffer.erase(new_length, s_len() - new_length); + s_ptr()[new_length - 1] = '\0'; } StackString trim() const @@ -385,4 +386,4 @@ namespace std return result; } }; -} \ No newline at end of file +}