diff options
| author | gingerBill <bill@gingerbill.org> | 2021-06-02 22:12:20 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-06-02 22:12:20 +0100 |
| commit | a4d9847f4555d576ed7da40056bf1d6dfbb52a76 (patch) | |
| tree | 70e9a440bb50a2ac52cd0581e1da3e3d1bae9382 /core/path/filepath/path.odin | |
| parent | 8aa6d70dec5a71f29e31d0268ab92fcb342762e9 (diff) | |
FINALLY fix `lazy_buffer_destroy`
Diffstat (limited to 'core/path/filepath/path.odin')
| -rw-r--r-- | core/path/filepath/path.odin | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/path/filepath/path.odin b/core/path/filepath/path.odin index 96f7cb7d0..6a3c5f7a2 100644 --- a/core/path/filepath/path.odin +++ b/core/path/filepath/path.odin @@ -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^ = {}; } |