mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-31 11:50:07 +00:00
Fix reflect.length
This commit is contained in:
+3
-1
@@ -53,7 +53,9 @@ resize :: inline proc(ptr: rawptr, old_size, new_size: int, alignment: int = DEF
|
||||
return nil;
|
||||
}
|
||||
if new_size == 0 {
|
||||
free(ptr, allocator, loc);
|
||||
if ptr != nil {
|
||||
allocator.procedure(allocator.data, Allocator_Mode.Free, 0, 0, ptr, 0, 0, loc);
|
||||
}
|
||||
return nil;
|
||||
} else if ptr == nil {
|
||||
return allocator.procedure(allocator.data, Allocator_Mode.Alloc, new_size, alignment, nil, 0, 0, loc);
|
||||
|
||||
Reference in New Issue
Block a user