diff options
author | Colin Snover | 2017-09-30 11:42:17 -0500 |
---|---|---|
committer | Colin Snover | 2017-09-30 11:42:49 -0500 |
commit | 128031c6a6d35a8092dc83e707b9a59feda4efdf (patch) | |
tree | 871f2396618770acff72b10a080c3bede2d26f92 /engines/sci/engine | |
parent | f46fa18006755f7ec8e351f095b7b21a497aa6a4 (diff) | |
download | scummvm-rg350-128031c6a6d35a8092dc83e707b9a59feda4efdf.tar.gz scummvm-rg350-128031c6a6d35a8092dc83e707b9a59feda4efdf.tar.bz2 scummvm-rg350-128031c6a6d35a8092dc83e707b9a59feda4efdf.zip |
SCI32: Fix crash when dying in RAMA
As it turns out, autorama.sg *is* actually used sometimes.
Fixes Trac#10253.
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kfile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index baa088de1f..51a3ceadf1 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -448,7 +448,7 @@ reg_t kFileIOOpen(EngineState *s, int argc, reg_t *argv) { } int saveNo = -1; - if (name == "911.sg") { + if (name == "911.sg" || name == "autorama.sg") { saveNo = kAutoSaveId; } else if (sscanf(name.c_str(), "ramasg.%i", &saveNo) == 1) { saveNo += kSaveIdShift; @@ -673,7 +673,7 @@ reg_t kFileIOUnlink(EngineState *s, int argc, reg_t *argv) { sscanf(name.c_str(), "ramasg.%i", &saveNo) == 1) { name = g_sci->getSavegameName(saveNo + kSaveIdShift); - } else if (g_sci->getGameId() == GID_RAMA && name == "911.sg") { + } else if (g_sci->getGameId() == GID_RAMA && (name == "911.sg" || name == "autorama.sg")) { name = g_sci->getSavegameName(kAutoSaveId); } |