diff options
| author | gingerBill <bill@gingerbill.org> | 2021-06-02 12:21:20 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2021-06-02 12:21:20 +0100 |
| commit | 8aa6d70dec5a71f29e31d0268ab92fcb342762e9 (patch) | |
| tree | 54b68642af5b2c4618fa97788cd4ade3ab555d5e /core/path/filepath/path.odin | |
| parent | ea6b222430d67162d80630d84adc3ed07bbd3808 (diff) | |
Fix filepath.lazy_buffer
Diffstat (limited to 'core/path/filepath/path.odin')
| -rw-r--r-- | core/path/filepath/path.odin | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/path/filepath/path.odin b/core/path/filepath/path.odin index eed257f97..96f7cb7d0 100644 --- a/core/path/filepath/path.odin +++ b/core/path/filepath/path.odin @@ -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^ = {}; } |