summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/m_hotkeys.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirLua/src/m_hotkeys.cpp')
-rw-r--r--plugins/MirLua/src/m_hotkeys.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/plugins/MirLua/src/m_hotkeys.cpp b/plugins/MirLua/src/m_hotkeys.cpp
index 6ab3f07625..2661197d2a 100644
--- a/plugins/MirLua/src/m_hotkeys.cpp
+++ b/plugins/MirLua/src/m_hotkeys.cpp
@@ -72,12 +72,8 @@ static int hotkeys_MakeHotkey(lua_State *L)
mod = (1 << (luaL_checkoption(L, 1, NULL, mods) - 1));
break;
case LUA_TTABLE:
- lua_pushnil(L);
- while (lua_next(L, 1) != 0)
- {
+ for (lua_pushnil(L); lua_next(L, 1); lua_pop(L, 1))
mod |= (1 << (luaL_checkoption(L, -1, NULL, mods) - 1));
- lua_pop(L, 1);
- }
break;
default:
luaL_argerror(L, 1, luaL_typename(L, 1));