From 99e747ceddb32b408921512979842251c28e54a5 Mon Sep 17 00:00:00 2001 From: Will Enright Date: Sun, 15 Jan 2017 22:01:46 -0600 Subject: [PATCH] Fix keyboard.isDown check for multiple keys --- src/modules/l_keyboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/l_keyboard.c b/src/modules/l_keyboard.c index 4b25f14..50dee19 100644 --- a/src/modules/l_keyboard.c +++ b/src/modules/l_keyboard.c @@ -21,7 +21,7 @@ int l_keyboard_isDown(lua_State *L) { int res = 0; int i; for (i = 1; i <= n; i++) { - const char *key = luaL_checkstring(L, 1); + const char *key = luaL_checkstring(L, i); res |= keyboard_isDown(key); } lua_pushboolean(L, res);