From 14a70317552b42bc85eb6d8f1bfd5a2d76d8da5a Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 5 Nov 2026 13:30:07 +0000 Subject: [PATCH] Decompile fn_23797 (HotkeyCount) Batch #12332 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_23797 HotkeyCount: logic confirmed by peer review Peer-reviewed-by: KWDev, Tanke, cremane Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/Hotkeys/UserHotkeyMgr.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Source/Contents/Hotkeys/UserHotkeyMgr.cpp b/Source/Contents/Hotkeys/UserHotkeyMgr.cpp index a60372da..b37271b9 100644 --- a/Source/Contents/Hotkeys/UserHotkeyMgr.cpp +++ b/Source/Contents/Hotkeys/UserHotkeyMgr.cpp @@ -83,15 +83,16 @@ namespace { int HotkeyCount(LuaScript& script, int tab) { int count = 0; if (script.Call("GetOriginalHotKeyListSize", "d>d", tab + 1, &count)) { + int hidden = 0; if (tab == 1) { - int hidden = 0; - for (int index = HK_FIRST_HIDDEN; index < count; ++index) { - hidden += HiddenInterfaceIndex(index); + if (HiddenInterfaceIndex(index)) { + ++hidden; + } } - - return count - hidden; } + + return count - hidden; } return count;