CStateMachine: Fix state name lookup

This commit is contained in:
Luke Street 2022-03-12 15:43:30 -05:00
parent a342859b51
commit ce646610cc
1 changed files with 1 additions and 1 deletions

View File

@ -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());