Skip to content

Commit

Permalink
fixed returning nil error when arena alloc fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron-Hodel committed Feb 23, 2025
1 parent 20e076c commit 02aeab7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/mem/allocators.odin
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ arena_resize_bytes_non_zeroed :: proc(
}
new_data, err := arena_alloc_bytes_non_zeroed(a, size, alignment, loc)
if err != nil {
return old_data, nil
return old_data, err
}
copy_non_overlapping(raw_data(new_data), raw_data(old_data), len(old_data))
return new_data, nil
Expand Down

0 comments on commit 02aeab7

Please sign in to comment.