From 1e32b3232af7989ef9f111fba886248ed44f5479 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sun, 1 Nov 2026 12:50:33 +0000 Subject: [PATCH] Decompile fn_16959 (UIWindow::WrapFormattedText) Batch #9418 by secret: 0 byte-identical, 1 confirmed by peer review. - fn_16959 UIWindow::WrapFormattedText: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, gordaoprogramas, Bielhp Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Window/UIWindow.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/UI/Window/UIWindow.cpp b/Source/UI/Window/UIWindow.cpp index a1948a24..26a27e2f 100644 --- a/Source/UI/Window/UIWindow.cpp +++ b/Source/UI/Window/UIWindow.cpp @@ -1654,7 +1654,7 @@ const char* UIWindow::TruncateText(const char* text, int maxBytes) { std::list UIWindow::WrapFormattedText(std::string text, std::list* lines, int maxWidth, int family, int height, unsigned char bold) { lines->clear(); if (maxWidth <= 0) { - maxWidth = this->FormattedTextWidth(text, family, height, bold); + maxWidth = this->FormattedTextWidth(text.c_str(), family, height, bold); } std::list widths; @@ -1737,7 +1737,7 @@ std::list UIWindow::WrapFormattedText(std::string text, std::list maxWidth) { + if (maxWidth < characterWidth + width) { lines->push_back(line); if (colorCode.empty()) { line.clear(); @@ -3167,3 +3167,5 @@ void UINavigationV4Wnd::DrawTargetSprite(int x, int y, int width, int height, co } } + +// OFFSET: 0x00A84400