Skip to content

Commit

Permalink
fix ValidateData when HELLFIRE is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
pionere committed Jul 26, 2024
1 parent ddb204e commit 085cc17
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Source/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,11 @@ void ValidateData()
int rnddrops = 0;
for (i = 0; i < NUM_IDI; i++) {
const ItemData& ids = AllItemsList[i];
if (ids.iName == NULL) {
if (i >= IDI_RNDDROP_FIRST || ids.iRnd != 0)
app_fatal("Invalid iRnd value for nameless item (%d)", i);
continue;
}
if (strlen(ids.iName) > 32 - 1)
app_fatal("Too long name for %s (%d)", ids.iName, i);
rnddrops += ids.iRnd;
Expand Down Expand Up @@ -1171,8 +1176,10 @@ void ValidateData()
app_fatal("No staff spell for GetStaffSpell.");
if (!hasScrollSpell)
app_fatal("No scroll spell for GetScrollSpell.");
#ifdef HELLFIRE
if (!hasRuneSpell)
app_fatal("No rune spell for GetRuneSpell.");
#endif

// missiles
for (i = 0; i < NUM_MISTYPES; i++) {
Expand Down

0 comments on commit 085cc17

Please sign in to comment.