From df1aefda719c85e3fcf5860a0e864adcc069868e Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Sat, 17 Jul 2021 14:23:54 -0700 Subject: [PATCH] Update src/storm/storage/expressions/PredicateExpression.cpp Co-authored-by: Tim Quatmann --- src/storm/storage/expressions/PredicateExpression.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/storm/storage/expressions/PredicateExpression.cpp b/src/storm/storage/expressions/PredicateExpression.cpp index 453a776ab..c0e7c3c86 100644 --- a/src/storm/storage/expressions/PredicateExpression.cpp +++ b/src/storm/storage/expressions/PredicateExpression.cpp @@ -106,11 +106,13 @@ namespace storm { case PredicateExpression::PredicateType::AtLeastOneOf: stream << "atLeastOneOf("; case PredicateExpression::PredicateType::ExactlyOneOf: stream << "exactlyOneOf("; } - stream << *operands[0]; - for (uint64_t i = 1; i < operands.size(); i++) { - stream << ", " << *operands[i]; + if (!operands.empty()) { + stream << *operands[0]; + for (uint64_t i = 1; i < operands.size(); i++) { + stream << ", " << *operands[i]; + } } stream << ")"; } } -} \ No newline at end of file +}