aboutsummaryrefslogtreecommitdiff
path: root/src/world.c
diff options
context:
space:
mode:
authornathansmithsmith <thenathansmithsmith@gmail.com>2023-07-08 00:38:14 -0600
committernathansmithsmith <thenathansmithsmith@gmail.com>2023-07-08 00:38:14 -0600
commitb92adb44b618db0272819cb77e5727441c566838 (patch)
treed46e5e3f57e870904a513e00ee0878bcf9c0ce39 /src/world.c
parent65e2d264393973746a1593252415ac61e04a438f (diff)
Some fix
Diffstat (limited to 'src/world.c')
-rw-r--r--src/world.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/world.c b/src/world.c
index d76a2d3..5fd654b 100644
--- a/src/world.c
+++ b/src/world.c
@@ -203,7 +203,8 @@ KfError removeEntityFromWorld(World * world, EntityId id) {
// Update lookup.
for (i = id + 1; i < world->lookUpSize; ++i)
- --world->lookUp[i];
+ if (world->lookUp[i] != ENTITY_ID_NONE)
+ --world->lookUp[i];
world->lookUp[id] = ENTITY_ID_NONE;