mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
mem: Make small_stack_resize* free if size is 0
This commit is contained in:
@@ -1537,7 +1537,7 @@ small_stack_resize_bytes_non_zeroed :: proc(
|
|||||||
return small_stack_alloc_bytes_non_zeroed(s, size, alignment, loc)
|
return small_stack_alloc_bytes_non_zeroed(s, size, alignment, loc)
|
||||||
}
|
}
|
||||||
if size == 0 {
|
if size == 0 {
|
||||||
return nil, nil
|
return nil, small_stack_free(s, old_memory, loc)
|
||||||
}
|
}
|
||||||
start := uintptr(raw_data(s.data))
|
start := uintptr(raw_data(s.data))
|
||||||
end := start + uintptr(len(s.data))
|
end := start + uintptr(len(s.data))
|
||||||
|
|||||||
Reference in New Issue
Block a user