mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-20 13:25:19 +00:00
Fix handle_map index on dynamic_add
This commit is contained in:
@@ -48,7 +48,8 @@ dynamic_add :: proc(m: ^$D/Dynamic_Handle_Map($T, $Handle_Type), item: T, loc :=
|
||||
xar.append(&m.items, T{}, loc) or_return
|
||||
}
|
||||
|
||||
i := xar.append(&m.items, item, loc) or_return
|
||||
_ = xar.append(&m.items, item, loc) or_return
|
||||
i := len(m.items)-1
|
||||
|
||||
ptr := xar.get_ptr_unsafe(&m.items, i)
|
||||
ptr^ = item
|
||||
|
||||
Reference in New Issue
Block a user