diff options
author | Max Horn | 2009-05-05 12:00:51 +0000 |
---|---|---|
committer | Max Horn | 2009-05-05 12:00:51 +0000 |
commit | 36f58b6378a5eea8565300096b9a9af9c26d66eb (patch) | |
tree | 86c3390364d5bc1ad7c2c5e1a90e31ffc25a026b | |
parent | 66067b0b6afc755497aa24be9fb9a2e5b2051303 (diff) | |
download | scummvm-rg350-36f58b6378a5eea8565300096b9a9af9c26d66eb.tar.gz scummvm-rg350-36f58b6378a5eea8565300096b9a9af9c26d66eb.tar.bz2 scummvm-rg350-36f58b6378a5eea8565300096b9a9af9c26d66eb.zip |
SCI: Fixed out of bounds access in (still incomplete?) string frags code
svn-id: r40321
-rw-r--r-- | engines/sci/engine/savegame.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 7741e802d2..83cd125f11 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -856,8 +856,8 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) { str = &retval->sys_strings->strings[SYS_STRING_SAVEDIR]; internal_stringfrag_strncpy(s, str->value, s->sys_strings->strings[SYS_STRING_SAVEDIR].value, str->max_size); - str->value[str->max_size].segment = s->string_frag_segment; // Make sure to terminate - str->value[str->max_size].offset &= 0xff00; // Make sure to terminate + str->value[str->max_size - 1].segment = s->string_frag_segment; // Make sure to terminate + str->value[str->max_size - 1].offset &= 0xff00; // Make sure to terminate // Time state: retval->last_wait_time = g_system->getMillis(); |