diff --git a/src/corelib/world.c b/src/corelib/world.c index 47ea660..2005a73 100644 --- a/src/corelib/world.c +++ b/src/corelib/world.c @@ -22,6 +22,10 @@ int _expand_world() { printf("ERROR: failed to expand world when requesting additional objects\n"); return 0; } else { + for(size_t i = _world_objects.num; i < new_num; ++i) { + _world_objects.objects[i] = NULL; + } + _world_objects.objects = new_list; _world_objects.num = new_num; return 1;