diff --git a/src/plugins/strings/strings.c b/src/plugins/strings/strings.c index c16a67a..6e7a0da 100644 --- a/src/plugins/strings/strings.c +++ b/src/plugins/strings/strings.c @@ -10,7 +10,7 @@ void str_init(char* str, int n) // could also use for (int i = 0; i < n; i++) str[i] = ' '; - str[n] = '\0'; + str[n-1] = '\0'; } int str_replace_start(const char* string, const char* target, const char* replacement, char* output) {