mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-11 07:17:48 -04:00
mem/virtual: fix arena_static_reset_to inverted logic
This commit is contained in:
1 parent
4e300ff90a
commit
9b4cd0743c
1 file changed
+2
-2
@@ -143,8 +143,8 @@ arena_static_reset_to :: proc(arena: ^Arena, pos: uint, loc := #caller_location)
|
||||
prev_pos := arena.curr_block.used
|
||||
arena.curr_block.used = clamp(pos, 0, arena.curr_block.reserved)
|
||||
|
||||
if prev_pos < pos {
|
||||
mem.zero_slice(arena.curr_block.base[arena.curr_block.used:][:pos-prev_pos])
|
||||
if prev_pos > pos {
|
||||
mem.zero_slice(arena.curr_block.base[arena.curr_block.used:][:prev_pos-pos])
|
||||
}
|
||||
arena.total_used = arena.curr_block.used
|
||||
return true
|
||||
|
||||
Reference in new issue
Block a user