fix off-by-one due to Lua being 1-indexed

This commit is contained in:
Tim Felgentreff 2021-01-10 07:31:19 +01:00
parent a7ea6d5b40
commit 4eb0016d75

View file

@ -1528,7 +1528,7 @@ static int CclAiProcessorStep(lua_State *l)
CTCPSocket *s = AiProcessorSendState(l, 'S');
int action = 0;
s->Recv(&action, 1);
lua_pushnumber(l, action);
lua_pushnumber(l, action + 1); // +1 since lua tables are 1-indexed
return 1;
}