[Scummvm-git-logs] scummvm branch-2-3 -> de7b9cb9dd606818d789b861526644d4ca0e9cf2

criezy criezy at scummvm.org
Mon Sep 6 23:24:07 UTC 2021


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

Summary:
de7b9cb9dd AGS: Fix savegame description in preparesavegamelist


Commit: de7b9cb9dd606818d789b861526644d4ca0e9cf2
    https://github.com/scummvm/scummvm/commit/de7b9cb9dd606818d789b861526644d4ca0e9cf2
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-09-07T00:23:58+01:00

Commit Message:
AGS: Fix savegame description in preparesavegamelist

We now use a U32String for the savegame descriptions, but
the code was calling c_str() directly on it, and the uint32 pointer
was casted to a char pointer along the way. This resulted in only
the first character of the description being displayed on little
endian systems (and probably none on big endian systems since the
first byte would be 0 for ASCII characters).

This fixes bug #12869

Changed paths:
    engines/ags/engine/gui/gui_dialog.cpp


diff --git a/engines/ags/engine/gui/gui_dialog.cpp b/engines/ags/engine/gui/gui_dialog.cpp
index 7330e8ab66..a10b0d26dc 100644
--- a/engines/ags/engine/gui/gui_dialog.cpp
+++ b/engines/ags/engine/gui/gui_dialog.cpp
@@ -287,7 +287,7 @@ void preparesavegamelist(int ctrllist) {
 	// fill in the list box and global savegameindex[] array for backward compatibilty
 	for (_G(numsaves) = 0; _G(numsaves) < (int)saveList.size(); ++_G(numsaves)) {
 		CSCISendControlMessage(ctrllist, CLB_ADDITEM, 0,
-		                       saveList[_G(numsaves)].getDescription().c_str());
+		                       saveList[_G(numsaves)].getDescription().encode().c_str());
 		_G(filenumbers)[_G(numsaves)] = saveList[_G(numsaves)].getSaveSlot();
 		_G(filedates)[_G(numsaves)] = 0;
 		//(long int)saveList[_G(numsaves)].FileTime;




More information about the Scummvm-git-logs mailing list