From 33f796eff836a53c89b5c4b3ab08e0befc2e61a0 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sat, 17 Apr 2021 14:44:33 +0200 Subject: [PATCH] Minor fixes for ScriptAggregator Signed-off-by: Deukhoofd --- src/Battling/ScriptHandling/ScriptAggregator.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Battling/ScriptHandling/ScriptAggregator.hpp b/src/Battling/ScriptHandling/ScriptAggregator.hpp index b63e5b8..d025358 100644 --- a/src/Battling/ScriptHandling/ScriptAggregator.hpp +++ b/src/Battling/ScriptHandling/ScriptAggregator.hpp @@ -7,16 +7,16 @@ namespace CreatureLib::Battling { class ScriptAggregator { - const ScriptWrapper* _scripts; - size_t _size; - size_t _index = 0; - size_t _setIndex = 0; + const ScriptWrapper *_scripts; + i32 _size; + i32 _index = 0; + i32 _setIndex = 0; inline void IncrementToNextNotNull(bool initialIncrement = true) { if (_scripts[_index].IsSet()) { _setIndex++; - if (_setIndex >= _scripts[_index].GetScriptSet()->Count()) { - _setIndex = 0; + if (_setIndex >= (i32) _scripts[_index].GetScriptSet()->Count()) { + _setIndex = -1; } else { return; }