From ce646610ccab4279510cb235b69c2b9b20296022 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Sat, 12 Mar 2022 15:43:30 -0500 Subject: [PATCH] CStateMachine: Fix state name lookup --- Runtime/World/CStateMachine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runtime/World/CStateMachine.cpp b/Runtime/World/CStateMachine.cpp index 4586d30bb..545c70ce9 100644 --- a/Runtime/World/CStateMachine.cpp +++ b/Runtime/World/CStateMachine.cpp @@ -20,10 +20,10 @@ CStateMachine::CStateMachine(CInputStream& in) { std::string name; while (name.size() < 31) { const auto chr = in.ReadChar(); - name += chr; if (chr == '\0') { break; } + name += chr; } CAiStateFunc func = CAi::GetStateFunc(name); x0_states.emplace_back(func, name.c_str());