Fix filepath.lazy_buffer

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

View File

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