From cfd7d45cb56e753c667d27db3c45157f85d4549d Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 5 Nov 2026 15:37:30 +0000 Subject: [PATCH] Decompile fn_11503 (UINaviLinkButton::Slot25) Batch #12179 by cremane: 0 byte-identical, 1 confirmed by peer review. - fn_11503 UINaviLinkButton::Slot25: logic confirmed by peer review Peer-reviewed-by: Yommy, gordaoprogramas, dori Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Buttons/UINaviLinkButton.cpp | 6 +++--- Source/UI/Text/NavigationLink.h | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/UI/Buttons/UINaviLinkButton.cpp b/Source/UI/Buttons/UINaviLinkButton.cpp index af70326b..a569eefa 100644 --- a/Source/UI/Buttons/UINaviLinkButton.cpp +++ b/Source/UI/Buttons/UINaviLinkButton.cpp @@ -12,7 +12,7 @@ UINaviLinkButton::~UINaviLinkButton() = default; // OFFSET: 0x00893050 // FUNCTION: fn_11503 void UINaviLinkButton::Slot25(int, int) { - const auto end = this->link.find(""); + const auto end = this->link.find(g_naviLinkTagEnd); if (end == std::string::npos) { return; @@ -24,8 +24,8 @@ void UINaviLinkButton::Slot25(int, int) { const int y = DecodeNavigationNumber(coordinates.substr(2, 2)); std::string map = this->link.substr(0, start); - if (map.find("") != std::string::npos) { - map = map.substr(7); + if (map.find(g_naviLinkTagBegin) != std::string::npos) { + map = map.substr(std::strlen(g_naviLinkTagBegin.c_str())); } if (!map.empty()) { diff --git a/Source/UI/Text/NavigationLink.h b/Source/UI/Text/NavigationLink.h index 7cceff3b..3e4aa658 100644 --- a/Source/UI/Text/NavigationLink.h +++ b/Source/UI/Text/NavigationLink.h @@ -16,6 +16,8 @@ struct NavigationLinkParser { }; extern NavigationLinkParser* g_navigationLinkParser; +extern std::string g_naviLinkTagBegin; +extern std::string g_naviLinkTagEnd; bool CreateNavigationLinkParser(); void DestroyNavigationLinkParser();