diff --git a/src/Battling/ScriptHandling/BattleScript.hpp b/src/Battling/ScriptHandling/BattleScript.hpp index 047030a..ec785d0 100644 --- a/src/Battling/ScriptHandling/BattleScript.hpp +++ b/src/Battling/ScriptHandling/BattleScript.hpp @@ -26,7 +26,10 @@ namespace CreatureLib::Battling { inline ArbUt::OptionalBorrowedPtr GetOwner() const noexcept { return _owner; } inline bool IsSuppressed() const noexcept { return _suppressed > 0; } inline void Suppress() { _suppressed++; } - inline void Unsuppress() { _suppressed--; } + inline void Unsuppress() { + if (_suppressed > 0) + _suppressed--; + } virtual ~BattleScript() = default;