From f09d19f0d1f0e56502332f047b42698ffe79b913 Mon Sep 17 00:00:00 2001 From: Daz <31415508+Daztek@users.noreply.github.com> Date: Mon, 4 Nov 2024 12:59:19 +0100 Subject: [PATCH] Race: fix a crash when removing effects --- Plugins/Race/Race.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Race/Race.cpp b/Plugins/Race/Race.cpp index 873638efe2..0c4939f939 100644 --- a/Plugins/Race/Race.cpp +++ b/Plugins/Race/Race.cpp @@ -185,7 +185,7 @@ void Race::RemoveRaceEffects(CNWSCreature *pCreature) return; std::vector remove(128); - for (int i = pCreature->m_appliedEffects.num; i >= 0; --i) + for (int32_t i = 0; i < pCreature->m_appliedEffects.num; i++) { auto eff = (CGameEffect*)pCreature->m_appliedEffects.element[i]; if (eff->m_sCustomTag == "NWNX_Race_RacialMod")