[Scummvm-cvs-logs] scummvm master -> d4a747705fa06be9a02a0fea2c5705f421ddd516
criezy
criezy at scummvm.org
Mon Apr 11 04:42:10 CEST 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d4a747705f DRASCULA: Fix random crash when loading pendulum scene savegame
Commit: d4a747705fa06be9a02a0fea2c5705f421ddd516
https://github.com/scummvm/scummvm/commit/d4a747705fa06be9a02a0fea2c5705f421ddd516
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2016-04-11T03:40:17+01:00
Commit Message:
DRASCULA: Fix random crash when loading pendulum scene savegame
When saving from the pendulum scene the curX and curY values are
negative while the curWidth and curHeight values are unset. This
causes random crashes as we may do an array out of bound access
when enterRoom() is called at the end of the load.
Changed paths:
engines/drascula/saveload.cpp
diff --git a/engines/drascula/saveload.cpp b/engines/drascula/saveload.cpp
index 9063fbc..94c4e81 100644
--- a/engines/drascula/saveload.cpp
+++ b/engines/drascula/saveload.cpp
@@ -300,6 +300,16 @@ bool DrasculaEngine::loadGame(int slot) {
if (!sscanf(currentData, "%d.ald", &roomNum)) {
error("Bad save format");
}
+
+ // When loading room 102 while being attached below the pendulum Some variables
+ // are not correctly set and can cause random crashes when calling enterRoom below.
+ // The crash occurs in moveCharacters() when accessing factor_red[curY + curHeight].
+ if (roomNum == 102 && flags[1] == 2) {
+ curX = 103;
+ curY = 108;
+ curWidth = curHeight = 0;
+ }
+
enterRoom(roomNum);
selectVerb(kVerbNone);
More information about the Scummvm-git-logs
mailing list