FINALLY fix lazy_buffer_destroy

This commit is contained in:
gingerBill
2021-06-02 22:12:20 +01:00
parent 8aa6d70dec
commit a4d9847f45

View File

@@ -170,8 +170,8 @@ clean :: proc(path: string, allocator := context.allocator) -> string {
cleaned, new_allocation := from_slash(s);
if new_allocation {
delete(s);
lazy_buffer_destroy(out);
}
lazy_buffer_destroy(out);
return cleaned;
}
@@ -397,8 +397,8 @@ lazy_buffer_string :: proc(lb: ^Lazy_Buffer) -> string {
return string(z);
}
@(private)
lazy_buffer_destroy :: proc(lb: ^Lazy_Buffer) {
delete(lb.b);
lazy_buffer_destroy :: proc(lb: ^Lazy_Buffer) {
free(lb);
lb^ = {};
}