[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
View File
@@ -1484,7 +1484,6 @@ bool Mob::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
if (
(IsCasting() && GetClass() != BARD && !IsFromSpell)
|| other == nullptr
|| ((IsClient() && CastToClient()->dead) || (other->IsClient() && other->CastToClient()->dead))
|| (GetHP() < 0)
|| (!IsAttackAllowed(other))