From 085cc17fa1e097c7099e7ec51e79b23ccf8f57bf Mon Sep 17 00:00:00 2001 From: pionere Date: Fri, 26 Jul 2024 13:59:09 +0200 Subject: [PATCH] fix ValidateData when HELLFIRE is not set --- Source/debug.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/debug.cpp b/Source/debug.cpp index e625704bd81..02fae847831 100644 --- a/Source/debug.cpp +++ b/Source/debug.cpp @@ -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; @@ -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++) {