Commit 5a0e3f00 authored by Jake Stine's avatar Jake Stine Committed by Jean-Andre Santoni
Browse files

Fix crash when pressing 2 keys at once [PP emergency patch]

parent 0903c683
Pipeline #22190 passed with stages
in 9 minutes and 36 seconds
...@@ -565,7 +565,6 @@ void lutro_gamepadevent(lua_State* L) ...@@ -565,7 +565,6 @@ void lutro_gamepadevent(lua_State* L)
lua_getfield(L, -1, is_down ? "gamepadpressed" : "gamepadreleased"); lua_getfield(L, -1, is_down ? "gamepadpressed" : "gamepadreleased");
if (lua_isfunction(L, -1)) if (lua_isfunction(L, -1))
{ {
lua_pushcfunction(L, traceback);
lua_pushnumber(L, i); lua_pushnumber(L, i);
lua_pushstring(L, input_find_name(joystick_enum, i)); lua_pushstring(L, input_find_name(joystick_enum, i));
if (lutro_pcall(L, 2, 0)) if (lutro_pcall(L, 2, 0))
...@@ -574,8 +573,8 @@ void lutro_gamepadevent(lua_State* L) ...@@ -574,8 +573,8 @@ void lutro_gamepadevent(lua_State* L)
lua_pop(L, 1); lua_pop(L, 1);
} }
input_cache[i] = is_down; input_cache[i] = is_down;
lua_pop(L, 1);
} }
lua_pop(L, 1);
} }
} }
lua_settop(L, oldtop); lua_settop(L, oldtop);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment