[Crash] Fix out of bound arrays, other potential crashes (#3166)

This commit is contained in:
Aeadoin
2023-04-01 12:44:41 -04:00
committed by GitHub
parent 0d509a7f3a
commit 0df84e1ee6
9 changed files with 34 additions and 24 deletions
+1 -2
View File
@@ -392,8 +392,7 @@ Corpse::Corpse(Client* client, int32 in_rezexp) : Mob (
/* Check Rule to see if we can leave corpses */
if (
!RuleB(Character, LeaveNakedCorpses) ||
RuleB(Character, LeaveCorpses) &&
(!RuleB(Character, LeaveNakedCorpses) || RuleB(Character, LeaveCorpses)) &&
GetLevel() >= RuleI(Character, DeathItemLossLevel)
) {
// cash