From 45d3aa8455fb728906a39b3dc5abe9892403f673 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 6 Nov 2026 14:55:27 +0000 Subject: [PATCH] Decompile fn_10940 (UINameBalloonText::SetName) Batch #13111 by cremane: 0 byte-identical, 1 confirmed by peer review. - fn_10940 UINameBalloonText::SetName: logic confirmed by peer review Peer-reviewed-by: gordaoprogramas, Tanke, codeplay Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Text/UIBalloonText.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/UI/Text/UIBalloonText.cpp b/Source/UI/Text/UIBalloonText.cpp index 04e17fdb..7e3bc1e9 100644 --- a/Source/UI/Text/UIBalloonText.cpp +++ b/Source/UI/Text/UIBalloonText.cpp @@ -412,8 +412,8 @@ void UINameBalloonText::SetName(const CActorNameCard& info, bool stripHash, unsi } int width = 32; - for (const std::string& line : this->m_lines) { - const int lineWidth = this->TextWidth(line.c_str(), 0, 0, g_nameBalloonFontHeight, g_serviceFlag06, 0) + 8; + for (auto line = this->m_lines.begin(); line != this->m_lines.end(); ++line) { + const int lineWidth = this->TextWidth(line->c_str(), 0, 0, g_nameBalloonFontHeight, g_serviceFlag06, 0) + 8; width = std::max(lineWidth, width); }