Ticket #5343: sci-saves.patch

File sci-saves.patch, 921 bytes (added by lordhoto, 10 years ago)

Patcha aginst trunk r52636

  • engines/sci/engine/kfile.cpp

    diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
    index e08f27c..d43f735 100644
    a b static void listSavegames(Common::Array<SavegameDesc> &saves) {  
    421421                Common::SeekableReadStream *in;
    422422                if ((in = saveFileMan->openForLoading(filename))) {
    423423                        SavegameMetadata meta;
    424                         if (!get_savegame_metadata(in, &meta) || meta.savegame_name.empty()) {
     424                        if (!get_savegame_metadata(in, &meta)) {
    425425                                // invalid
    426426                                delete in;
    427427                                continue;
  • engines/sci/engine/savegame.cpp

    diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
    index 88f5d29..4df577b 100644
    a b bool get_savegame_metadata(Common::SeekableReadStream *stream, SavegameMetadata  
    793793                return false;
    794794        }
    795795
    796         return true;
     796        return !stream->err();
    797797}
    798798
    799799} // End of namespace Sci