fix stringbuilder bug

This commit is contained in:
2025-12-07 00:07:18 +01:00
parent 22c5da0e76
commit e13f66b9e4
+1 -1
View File
@@ -87,7 +87,7 @@ void sb_add_substring(string_builder_t *this, const char *string, size_t substri
for ( size_t i = 0; i < min_length; i++ ) {
buffer[i] = string[i];
}
buffer[min_length-1] = '\0';
buffer[min_length] = '\0';
sb_add_string(this, buffer);
}