Skip to content

Commit

Permalink
validate GetDamageAmt in ValidateData
Browse files Browse the repository at this point in the history
  • Loading branch information
pionere committed Sep 13, 2024
1 parent 027289e commit 5a7c81d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Source/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions Source/missiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 5a7c81d

Please sign in to comment.