From: Holger Schemel Date: Thu, 15 Aug 2024 22:06:48 +0000 (+0200) Subject: minor change of BD element properties array check X-Git-Tag: 4.4.0.0-test-4~306 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=1fb076b6d73e3d849d61012eb35c60da41ae40cc;p=rocksndiamonds.git minor change of BD element properties array check --- 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