From 6b2798b6d0ebb1fdf0b23e0cf9bee4a4a0f581ae Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Tue, 10 Nov 2026 11:09:57 +0000 Subject: [PATCH] Decompile fn_11504 (UIWindow::WrapLinkText) Batch #15875 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_11504 UIWindow::WrapLinkText: logic confirmed by peer review Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Text/PixelTextWrapping.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/UI/Text/PixelTextWrapping.cpp b/Source/UI/Text/PixelTextWrapping.cpp index 7a36f285d..fed79525b 100644 --- a/Source/UI/Text/PixelTextWrapping.cpp +++ b/Source/UI/Text/PixelTextWrapping.cpp @@ -133,12 +133,14 @@ void UIWindow::WrapPixelText(const char* text, std::vector& lines, // OFFSET: 0x008932D0 // FUNCTION: fn_11504 void UIWindow::WrapLinkText(int* kind, std::vector* lines, const std::string& text) { - const char* characters = text.c_str(); + int width = this->geometry.width; if (*kind != 3) { - this->WrapPixelText(characters, *lines, this->geometry.width - 16); + width -= 16; + this->WrapPixelText(text.c_str(), *lines, width); return; } + width -= 24; std::vector wrapped; - this->WrapTextWithBreaks(characters, lines, &wrapped, this->geometry.width - 24); + this->WrapTextWithBreaks(text.c_str(), lines, &wrapped, width); }