From 544f18e9c6cc591f4eb4730eddeaff5176516f1b Mon Sep 17 00:00:00 2001 From: Sara Date: Wed, 12 Jul 2023 02:16:05 +0200 Subject: [PATCH] added error when failing to expand world --- src/corelib/world.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/corelib/world.c b/src/corelib/world.c index af89ea5..a7ce34b 100644 --- a/src/corelib/world.c +++ b/src/corelib/world.c @@ -16,6 +16,7 @@ int _expand_world() { size_t new_num = _world_objects.num * 2; object_t** new_list = realloc(_world_objects.objects, new_num * sizeof(object_t*)); if(new_list == NULL) { + printf("ERROR: failed to expand world when requesting additional objects\n"); return 0; } else { _world_objects.objects = new_list;