Fix keyboard.isDown check for multiple keys

This commit is contained in:
Will Enright
2017-01-15 22:01:46 -06:00
parent 1ce4372aee
commit 99e747cedd

View File

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