[Scummvm-cvs-logs] CVS: scummvm/sword1 control.cpp,1.61.2.3,1.61.2.4
Torbjörn Andersson
eriktorbjorn at users.sourceforge.net
Mon Nov 7 23:38:26 CET 2005
Update of /cvsroot/scummvm/scummvm/sword1
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10013
Modified Files:
Tag: branch-0-8-0
control.cpp
Log Message:
Backported fix for "I/O error" warning when the savegame list has "holes"
in it. (Caused by writing empty strings to the savegame index.)
Index: control.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/control.cpp,v
retrieving revision 1.61.2.3
retrieving revision 1.61.2.4
diff -u -d -r1.61.2.3 -r1.61.2.4
--- control.cpp 26 Oct 2005 06:36:00 -0000 1.61.2.3
+++ control.cpp 8 Nov 2005 07:37:51 -0000 1.61.2.4
@@ -756,7 +756,9 @@
while (strlen((char*)_saveNames[_saveFiles - 1]) == 0)
_saveFiles--;
for (uint8 cnt = 0; cnt < _saveFiles; cnt++) {
- outf->write(_saveNames[cnt], strlen((char*)_saveNames[cnt]));
+ int len = strlen((char*)_saveNames[cnt]);
+ if (len > 0)
+ outf->write(_saveNames[cnt], len);
if (cnt < _saveFiles - 1)
outf->writeByte(10);
else
More information about the Scummvm-git-logs
mailing list