Skip to content

Commit

Permalink
Fix Lua AI component return values being lost
Browse files Browse the repository at this point in the history
  • Loading branch information
CelticMinstrel authored and mattsc committed Mar 22, 2016
1 parent c49fc8a commit 597ab40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ai/lua/core.cpp
Expand Up @@ -1140,7 +1140,7 @@ void lua_ai_action_handler::handle(const config &cfg, bool read_only, lua_object
// Call the function
luaW_pcall(L, 3, l_obj ? 1 : 0, true);
if (l_obj) {
l_obj->store(L, initial_top + 1);
l_obj->store(L, -1);
}

lua_settop(L, initial_top);//empty stack
Expand Down

0 comments on commit 597ab40

Please sign in to comment.