Menu

#1762 Impossible to start directly with a save game

The Dig
closed-fixed
5
2004-09-12
2004-09-11
zebulon
No

ScummVM 0.7.0CVS (Sep 11 2004 08:29:53)
Features compiled in: Vorbis FLAC MP3 zLib MPEG2

Description : when I try to launch the game with a save
game number in the command line, a debug console opens
and says "ERROR: saveLoadArrayOf: invalid filetype 0".
Buf if I launch the game first and then load a save
game, it works.
I tested with Monkey Island 2 and this doesn't happen.

Language : english

Platform : win32

The bug didn't exist in the previous build.

Discussion

  • James Brown

    James Brown - 2004-09-11
    • assigned_to: nobody --> ender
     
  • James Brown

    James Brown - 2004-09-11

    Logged In: YES
    user_id=2715

    Can you please attach a sample save game you are having
    issues with?

     
  • zebulon

    zebulon - 2004-09-11

    Logged In: YES
    user_id=1116515

    Here's one save game (you can get another one, see my
    previous bug report that had nothing to do with this).

     
  • zebulon

    zebulon - 2004-09-11

    A random save game

     
  • Max Horn

    Max Horn - 2004-09-12

    Logged In: YES
    user_id=12935

    Hi folks, I just found a net access over here (so far having a nice
    vacation :-), and i noticed that this new MD5 save/load code looks
    fishy. For one thing, it overwrites memory (Array out of bounds
    access) since you copy 17 bytes to md5Backup, not 16; simply
    change line 665 in saveload.cpp to:
    memcpy(md5Backup, _gameMD5, 16);

    The code afterwards is probably wrong, too: it matches the old and new
    MD5 value; if they differ, it'll change exactly the first differing byte in
    _gameMD5; but not the rest! So if the savegame MD5 starts with 1234...
    and _gameMD5 with ABCD, you end up with something like A234...->
    very bad.
    Again, the solution would be to use memcmp / memcpy:
    ...
    if (0 != memcmp(md5Backup, _gameMD5, 16)) {
    warning("FOO");
    }
    memcpy(_gameMD5, md5Backup, 16);
    ...

     
  • James Brown

    James Brown - 2004-09-12
    • status: open --> closed-fixed
     
  • James Brown

    James Brown - 2004-09-12

    Logged In: YES
    user_id=2715

    I confess to being a very bad programmer last night, pleading
    commiting under the influence.

    Fixed. Thanks fingolfin, enjoy the rest of your holiday :o)

     
Auth0 Logo