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 +}