[Scummvm-git-logs] scummvm master -> 60d86686e6dbc3c538ab78f3de56518420089645

criezy criezy at scummvm.org
Mon Sep 6 23:23:39 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:
60d86686e6 AGS: Fix savegame description in preparesavegamelist


Commit: 60d86686e6dbc3c538ab78f3de56518420089645
    https://github.com/scummvm/scummvm/commit/60d86686e6dbc3c538ab78f3de56518420089645
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-09-07T00:18:02+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