From d6f276be6bc1214c88cfc5346ceb7a5bea610638 Mon Sep 17 00:00:00 2001 From: iamcheeseman <[hidden email]> Date: Wed, 14 Jan 2026 19:21:33 -0500 Subject: i HATE physics bugs (i haven't fixed them yet) --- src/entity_list.odin | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/entity_list.odin') diff --git a/src/entity_list.odin b/src/entity_list.odin index ce69be8..3ee553e 100644 --- a/src/entity_list.odin +++ b/src/entity_list.odin @@ -48,7 +48,9 @@ delete_entity :: proc(list: ^Entity_List($T), handle: Entity_Handle) { } get_entity :: proc(list: Entity_List($T), h: Entity_Handle) -> ^T { - if h.idx < 1 || h.idx >= len(list.items) || list.items[h.idx].handle == h { + if h.idx < 1 || + h.idx >= u32(len(list.items)) || + list.items[h.idx].handle != h { return nil } return &list.items[h.idx] @@ -61,7 +63,7 @@ active_entity_count :: proc(list: Entity_List($T)) -> int { Entity_List_Iter :: struct($T: typeid) { list: Entity_List(T), - idx: int, + idx: int, } iter_entity_list :: proc(list: Entity_List($T)) -> Entity_List_Iter(T) { -- cgit v1.3-2-g0d8e