diff --git a/src/storm/generator/NextStateGenerator.cpp b/src/storm/generator/NextStateGenerator.cpp index 588edb70a..7f931051f 100644 --- a/src/storm/generator/NextStateGenerator.cpp +++ b/src/storm/generator/NextStateGenerator.cpp @@ -119,7 +119,7 @@ namespace storm { result.getChoices().front().add(choice); // Swap the choice to the end to indicate it can be removed (if it's not already there). - if (index != result.getNumberOfChoices() - 1) { + if (index != result.getNumberOfChoices() - 1 - numberOfChoicesToDelete) { choice = std::move(result.getChoices()[result.getNumberOfChoices() - 1 - numberOfChoicesToDelete]); } ++numberOfChoicesToDelete;