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); }