diff options
author | Johannes Schickel | 2008-10-20 21:55:20 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-10-20 21:55:20 +0000 |
commit | a5a73ff9d6d7257bcc64335b29c558a7706f3507 (patch) | |
tree | 6f619196efe5a10bca22eb50ce9b6fb55ab347f8 /engines | |
parent | 07220529dc8978b2c2e94662ae9b5a2ec910369e (diff) | |
download | scummvm-rg350-a5a73ff9d6d7257bcc64335b29c558a7706f3507.tar.gz scummvm-rg350-a5a73ff9d6d7257bcc64335b29c558a7706f3507.tar.bz2 scummvm-rg350-a5a73ff9d6d7257bcc64335b29c558a7706f3507.zip |
Formatting.
svn-id: r34830
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sword1/sword1.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/engines/sword1/sword1.cpp b/engines/sword1/sword1.cpp index 378d3b84bb..70b528c437 100644 --- a/engines/sword1/sword1.cpp +++ b/engines/sword1/sword1.cpp @@ -222,24 +222,23 @@ SaveStateList SwordMetaEngine::listSaves(const char *target) const { uint pos = 0; do { stop = in->readByte(); - if (pos < (sizeof(saveDesc) - 1)) { - if ((stop == 10) || (stop == 255) || (in->eos())) { + if (pos < (sizeof(saveDesc) - 1)) { + if ((stop == 10) || (stop == 255) || (in->eos())) saveDesc[pos++] = '\0'; - } - else if (stop >= 32) { + else if (stop >= 32) saveDesc[pos++] = stop; - } } } while ((stop != 10) && (stop != 255) && (!in->eos())); + if (saveDesc[0] != 0) { saveList.push_back(SaveStateDescriptor(slotNum, saveDesc, *file)); file++; } } while ((stop != 255) && (!in->eos())); } - + delete in; - + return saveList; } |