From ca7f713cc942ac680dd43254e7d543ca234bcaba Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 7 Nov 2026 07:30:00 +0000 Subject: [PATCH] Decompile fn_10408 (NavigationLinkParser::ExpandMessages) Batch #14274 by secret: 0 byte-identical, 1 confirmed by peer review. - fn_10408 NavigationLinkParser::ExpandMessages: logic confirmed by peer review Peer-reviewed-by: Yommy, KWDev, codeplay Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Text/NavigationLink.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Source/UI/Text/NavigationLink.cpp b/Source/UI/Text/NavigationLink.cpp index 25bac3d0d..2cdf0649d 100644 --- a/Source/UI/Text/NavigationLink.cpp +++ b/Source/UI/Text/NavigationLink.cpp @@ -169,6 +169,8 @@ void DestroyNavigationLinkParser() { static const std::string g_parserMessageTag = ""; // GLOBAL: gl_25507 static const std::string g_parserMessageCloseTag = ""; +// STRING: st_13792 +static const std::string g_parserMessageIdPrefix = "MSI_"; // STRING: st_13793 static const std::string g_parserLineBreakTag = ""; // GLOBAL: gl_25498 @@ -238,18 +240,18 @@ std::string NavigationLinkParser::ExpandMessages(std::string text) { const std::size_t begin = work.find(g_parserMessageTag); if (begin == std::string::npos) { - return text; + break; } work = work.substr(begin + std::strlen(g_parserMessageTag.c_str())); const std::size_t end = work.find(g_parserMessageCloseTag); if (end == std::string::npos) { - return text; + break; } work = work.substr(0, end); int messageId; - if (work.find("MSI_") != std::string::npos) { + if (work.find(g_parserMessageIdPrefix) != std::string::npos) { messageId = FindMessageId(work.c_str()); } else { messageId = std::atoi(work.c_str()); @@ -263,7 +265,8 @@ std::string NavigationLinkParser::ExpandMessages(std::string text) { work = expanded; } const std::string head = work.substr(0, begin); - const std::string tail = work.substr(work.find(g_parserMessageCloseTag) + std::strlen(g_parserMessageCloseTag.c_str())); + const std::size_t close = work.find(g_parserMessageCloseTag); + const std::string tail = work.substr(close + std::strlen(g_parserMessageCloseTag.c_str())); expanded.clear(); expanded += head; expanded += message; @@ -273,6 +276,8 @@ std::string NavigationLinkParser::ExpandMessages(std::string text) { return expanded; } } + + return text; } // OFFSET: 0x00833160