Skip to content
This repository has been archived by the owner on Jan 7, 2023. It is now read-only.

Fix keyboard.isDown check for multiple keys #2

Merged
merged 1 commit into from
Jan 16, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/modules/l_keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down