Try and catch more edge cases where setIndex would be invalid.
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
2021-04-17 16:31:03 +02:00
parent 8f9f2b2b8d
commit 13df99a6cc
2 changed files with 13 additions and 4 deletions

View File

@@ -25,6 +25,9 @@ namespace CreatureLib::Battling {
_index++;
while (HasNext()) {
if (_scripts[_index].HasValue()) {
if (_scripts[_index].IsSet()) {
_setIndex = -1;
}
return;
}
_index++;