From 1fb076b6d73e3d849d61012eb35c60da41ae40cc Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Fri, 16 Aug 2024 00:06:48 +0200 Subject: [PATCH] minor change of BD element properties array check --- src/game_bd/bd_cavedb.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/game_bd/bd_cavedb.c b/src/game_bd/bd_cavedb.c index bcb3f7ef..0c6fca7c 100644 --- a/src/game_bd/bd_cavedb.c +++ b/src/game_bd/bd_cavedb.c @@ -1506,7 +1506,7 @@ GdElementProperty gd_element_properties[] = }, { - -1 + O_MAX_ALL }, }; @@ -2897,10 +2897,12 @@ void gd_cave_db_init(void) lowercase_names = FALSE; // check element database for faults. - for (i = 0; gd_element_properties[i].element != -1; i++) + for (i = 0; gd_element_properties[i].element != O_MAX_ALL; i++) { if (gd_element_properties[i].element != i) - Error("element: i:0x%x != 0x%x", i, gd_element_properties[i].element); + Fail("invalid element: i: 0x%x != 0x%x ['%s']", i, + gd_element_properties[i].element, + gd_element_properties[i].filename); // if it has a name, create a lowercase name (of the translated one). // will be used by the editor -- 2.34.1