now initializing newly expanded world space with nullptrs

pull/12/head
Sara 2023-07-12 02:28:13 +02:00
parent 6a52f2795d
commit a139e4f3bb
1 changed files with 4 additions and 0 deletions

View File

@ -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;