reset builder after building

This commit is contained in:
2025-12-06 22:32:48 +01:00
parent 0875f206cb
commit 22c5da0e76
+3
View File
@@ -117,5 +117,8 @@ const char *sb_build(
} }
} }
buffer[total_length-1] = '\0'; buffer[total_length-1] = '\0';
// resets the builder after building.
this->head = NULL;
this->tail = NULL;
return buffer; return buffer;
} }