From 505aa6b178a6c7ca63a9a4e17942872befc602a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Mon, 2 Sep 2019 20:27:53 +0200 Subject: [PATCH] state: Fix an off-by-one --- source/game/state.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/game/state.cpp b/source/game/state.cpp index 2d6f32e..32d1dd6 100644 --- a/source/game/state.cpp +++ b/source/game/state.cpp @@ -24,7 +24,7 @@ static constexpr StateInfo ex_state_info_table[] = { template static const StateInfo* FindStateInfo(Predicate predicate) { const auto* table = rst::util::GetPointer(0x6883FC); - auto it = std::find_if(table, table + 9, predicate); + auto it = std::find_if(table, table + 10, predicate); if (it != table + 9) return it;