[Scummvm-git-logs] scummvm master -> cdcca72538243d7f125820303a4c027c64cd677b

tag2015 noreply at scummvm.org
Tue Jul 22 21:21:11 UTC 2025


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
cdcca72538 GUI: Fix char counting in achievements containing  non-ASCII chars


Commit: cdcca72538243d7f125820303a4c027c64cd677b
    https://github.com/scummvm/scummvm/commit/cdcca72538243d7f125820303a4c027c64cd677b
Author: Walter Agazzi (walter.agazzi at protonmail.com)
Date: 2025-07-22T23:19:19+02:00

Commit Message:
GUI: Fix char counting in achievements containing  non-ASCII chars

Changed paths:
    gui/options.cpp


diff --git a/gui/options.cpp b/gui/options.cpp
index 4bbed3cc329..203b74535a6 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -1540,8 +1540,8 @@ void OptionsDialog::addAchievementsControls(GuiObject *boss, const Common::Strin
 			yPos += yStep;
 
 			if (!descr->comment.empty()) {
-				uint16 str_chars = descr->comment.size(), printed_chars = 0, i = 0;
 				Common::U32String comment_line(descr->comment);
+				uint16 str_chars = comment_line.size(), printed_chars = 0, i = 0;
 				while ((str_chars - printed_chars) > textline_numchars) { // check if string needs to go on multiple lines
 					for (i = (printed_chars + textline_numchars - 1); comment_line[i] != ' ' && i > 0; i--) {}; // find a space to avoid breaking words
 					new StaticTextWidget(scrollContainer, lineHeight + commentDelta, yPos, width - commentDelta, yStep, Common::U32String(comment_line.begin() + (!printed_chars ? 0 : (printed_chars + 1)), comment_line.begin() + i), Graphics::kTextAlignStart, Common::U32String(), ThemeEngine::kFontStyleNormal);




More information about the Scummvm-git-logs mailing list