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.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/MirLua/src/m_hotkeys.cpp b/plugins/MirLua/src/m_hotkeys.cpp
index 9cd4ad3aa7..b0d1e04d49 100644
--- a/plugins/MirLua/src/m_hotkeys.cpp
+++ b/plugins/MirLua/src/m_hotkeys.cpp
@@ -47,7 +47,9 @@ static int hotkeys_Register(lua_State *L)
HOTKEYDESC hk;
MakeHotkey(L, hk);
- INT_PTR res = ::CallService("CoreHotkeys/Register", (WPARAM)g_mLua->GetHLangpack(), (LPARAM)&hk);
+ int hScriptLangpack = CMLuaScript::GetScriptIdFromEnviroment(L);
+
+ INT_PTR res = ::CallService("CoreHotkeys/Register", (WPARAM)hScriptLangpack, (LPARAM)&hk);
lua_pushboolean(L, res);
return 1;