Fixes potential overflow in script suppression.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
9ede453587
commit
a78b2e54a4
|
@ -26,7 +26,10 @@ namespace CreatureLib::Battling {
|
||||||
inline ArbUt::OptionalBorrowedPtr<void> GetOwner() const noexcept { return _owner; }
|
inline ArbUt::OptionalBorrowedPtr<void> GetOwner() const noexcept { return _owner; }
|
||||||
inline bool IsSuppressed() const noexcept { return _suppressed > 0; }
|
inline bool IsSuppressed() const noexcept { return _suppressed > 0; }
|
||||||
inline void Suppress() { _suppressed++; }
|
inline void Suppress() { _suppressed++; }
|
||||||
inline void Unsuppress() { _suppressed--; }
|
inline void Unsuppress() {
|
||||||
|
if (_suppressed > 0)
|
||||||
|
_suppressed--;
|
||||||
|
}
|
||||||
|
|
||||||
virtual ~BattleScript() = default;
|
virtual ~BattleScript() = default;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue