diff --git a/src/include/deepstate/DeepState.hpp b/src/include/deepstate/DeepState.hpp index f5572cd..f607bc8 100644 --- a/src/include/deepstate/DeepState.hpp +++ b/src/include/deepstate/DeepState.hpp @@ -329,7 +329,7 @@ template inline static void OneOf(FuncTys&&... funcs) { std::function func_arr[sizeof...(FuncTys)] = {funcs...}; unsigned index = DeepState_UIntInRange( - 0U, static_cast(sizeof...(funcs))); + 0U, static_cast(sizeof...(funcs))-1); func_arr[Pump(index, sizeof...(funcs))](); }