diff --git a/src/include/deepstate/DeepState.h b/src/include/deepstate/DeepState.h index 2059824..163d921 100644 --- a/src/include/deepstate/DeepState.h +++ b/src/include/deepstate/DeepState.h @@ -272,7 +272,7 @@ DEEPSTATE_INLINE static void DeepState_Check(int expr) { } \ if ((x < low) || (x > high)) { \ const tname size = (high - low) + 1; \ - return low + (x % size); \ + return low + ((x % size + size) % size); \ } \ return x; \ }