From 922d6f6572429c5723829c572c3015ddea83508d Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Fri, 21 May 2021 21:23:54 -0700 Subject: [PATCH] export of compressed states to json with negative values fixed --- src/storm/generator/CompressedState.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/storm/generator/CompressedState.cpp b/src/storm/generator/CompressedState.cpp index 1cbf7438e..586d2c702 100644 --- a/src/storm/generator/CompressedState.cpp +++ b/src/storm/generator/CompressedState.cpp @@ -168,7 +168,8 @@ namespace storm { if (onlyObservable && !integerVariable.observable) { continue; } - result[integerVariable.getName()] = state.getAsInt(integerVariable.bitOffset, integerVariable.bitWidth) + integerVariable.lowerBound; + STORM_LOG_ASSERT(integerVariable.bitWidth <= 63, "Only integer variables with at most 63 bits are supported"); + result[integerVariable.getName()] = static_cast(state.getAsInt(integerVariable.bitOffset, integerVariable.bitWidth)) + integerVariable.lowerBound; } return result; }