mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-19 21:10:30 +00:00
Fix filepath.lazy_buffer
This commit is contained in:
@@ -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^ = {};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user