diff options
author | Torbjörn Andersson | 2005-11-08 07:28:31 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2005-11-08 07:28:31 +0000 |
commit | be5bae910619c7902640f8d650a94af3ee3cbbb4 (patch) | |
tree | 2b64de17afbd51479e893e495f02284d30fe0375 | |
parent | 18b5b7123d5c468f8d3aec839771bb1490f43636 (diff) | |
download | scummvm-rg350-be5bae910619c7902640f8d650a94af3ee3cbbb4.tar.gz scummvm-rg350-be5bae910619c7902640f8d650a94af3ee3cbbb4.tar.bz2 scummvm-rg350-be5bae910619c7902640f8d650a94af3ee3cbbb4.zip |
Don't write empty save slot names to the savegame index. All that does is
raising the "I/O error" flag.
svn-id: r19514
-rw-r--r-- | sword1/control.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sword1/control.cpp b/sword1/control.cpp index c19b98843b..833a5cc00a 100644 --- a/sword1/control.cpp +++ b/sword1/control.cpp @@ -756,7 +756,9 @@ void Control::writeSavegameDescriptions(void) { 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 |