From 5a7c81d64d0a72cf8f4c2f610e680d3b56ced0f5 Mon Sep 17 00:00:00 2001 From: pionere Date: Fri, 13 Sep 2024 16:26:28 +0200 Subject: [PATCH] validate GetDamageAmt in ValidateData --- Source/debug.cpp | 4 +++- Source/missiles.cpp | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/debug.cpp b/Source/debug.cpp index 996ebbc1121..d4fc288ecf9 100644 --- a/Source/debug.cpp +++ b/Source/debug.cpp @@ -92,7 +92,7 @@ static void PrintText(const char* text, char lineSep, int limit) col = COL_WHITE; } s = ReadTextLine(s, lineSep, limit); - // w = GetSmallStringWidth(tempstr); + // w = GetSmallStringWidth(tempstr); // LogErrorF("%03d(%04d):%s", i++, w, tempstr); if (col == COL_RED) @@ -1291,6 +1291,8 @@ void ValidateData() bool hasBookSpell = false, hasStaffSpell = false, hasScrollSpell = false, hasRuneSpell = false; for (i = 0; i < NUM_SPELLS; i++) { const SpellData& sd = spelldata[i]; + int mind, maxd; + GetDamageAmt(i, 0, &mind, &maxd); if (i == SPL_DISARM || i == SPL_HEALOTHER || i == SPL_RESURRECT || i == SPL_IDENTIFY || i == SPL_OIL || i == SPL_REPAIR || i == SPL_RECHARGE diff --git a/Source/missiles.cpp b/Source/missiles.cpp index dbfee716fb0..a0cce90e37a 100644 --- a/Source/missiles.cpp +++ b/Source/missiles.cpp @@ -105,6 +105,7 @@ void GetDamageAmt(int sn, int sl, int* minv, int* maxv) case SPL_HEALOTHER: case SPL_RESURRECT: case SPL_IDENTIFY: + case SPL_OIL: case SPL_REPAIR: case SPL_RECHARGE: case SPL_DISARM: