[Scummvm-cvs-logs] scummvm master -> dbf3e29b2d66c3b223c9e976af2a18fd91247bfe
Strangerke
Strangerke at scummvm.org
Fri Jan 29 07:17:42 CET 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:
dbf3e29b2d ACCESS: Fix some uninitialized variables
Commit: dbf3e29b2d66c3b223c9e976af2a18fd91247bfe
https://github.com/scummvm/scummvm/commit/dbf3e29b2d66c3b223c9e976af2a18fd91247bfe
Author: Strangerke (strangerke at scummvm.org)
Date: 2016-01-29T07:10:32+01:00
Commit Message:
ACCESS: Fix some uninitialized variables
Changed paths:
engines/access/animation.cpp
engines/access/bubble_box.cpp
engines/access/martian/martian_game.cpp
diff --git a/engines/access/animation.cpp b/engines/access/animation.cpp
index 259396f..22de0fc 100644
--- a/engines/access/animation.cpp
+++ b/engines/access/animation.cpp
@@ -57,8 +57,13 @@ Animation::Animation(AccessEngine *vm, Common::SeekableReadStream *stream) : Man
// WORKAROUND: In Amazon floppy English, there's an animation associated with
// the librarian that isn't used, and has junk data. Luckily, it's animation
// type is also invalid, so if the _type isn't in range, exit immediately
- if (_type < 0 || _type > 7)
+ if (_type < 0 || _type > 7) {
+ _scaling = -1;
+ _frameNumber = -1;
+ _initialTicks = _countdownTicks = 0;
+ _loopCount = _currentLoopCount = 0;
return;
+ }
_scaling = stream->readSByte();
stream->readByte(); // unk
diff --git a/engines/access/bubble_box.cpp b/engines/access/bubble_box.cpp
index 831ba50..ef32e96 100644
--- a/engines/access/bubble_box.cpp
+++ b/engines/access/bubble_box.cpp
@@ -46,6 +46,9 @@ BubbleBox::BubbleBox(AccessEngine *vm, Access::BoxType type, int x, int y, int w
}
_btnUpPos = Common::Rect(0, 0, 0, 0);
_btnDownPos = Common::Rect(0, 0, 0, 0);
+ _startItem = _startBox = 0;
+ _charCol = 0;
+ _rowOff = 0;
}
void BubbleBox::load(Common::SeekableReadStream *stream) {
diff --git a/engines/access/martian/martian_game.cpp b/engines/access/martian/martian_game.cpp
index 4e85856..00ee6c9 100644
--- a/engines/access/martian/martian_game.cpp
+++ b/engines/access/martian/martian_game.cpp
@@ -36,6 +36,8 @@ MartianEngine::MartianEngine(OSystem *syst, const AccessGameDescription *gameDes
MartianEngine::~MartianEngine() {
_introObjects = _spec7Objects = nullptr;
+ _skipStart = false;
+ _creditsStream = nullptr;
}
void MartianEngine::initObjects() {
More information about the Scummvm-git-logs
mailing list