diff --git a/string_builder.c b/string_builder.c index a50edc7..5122c87 100644 --- a/string_builder.c +++ b/string_builder.c @@ -117,5 +117,8 @@ const char *sb_build( } } buffer[total_length-1] = '\0'; + // resets the builder after building. + this->head = NULL; + this->tail = NULL; return buffer; }