[Scummvm-cvs-logs] scummvm master -> 54095bd323a755b23cc5de462ba810d4b5f7484b
Strangerke
Strangerke at scummvm.org
Wed Feb 26 08:01:33 CET 2014
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:
54095bd323 VOYEUR: Add a sanity check in loadAStack()
Commit: 54095bd323a755b23cc5de462ba810d4b5f7484b
https://github.com/scummvm/scummvm/commit/54095bd323a755b23cc5de462ba810d4b5f7484b
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-02-25T22:59:56-08:00
Commit Message:
VOYEUR: Add a sanity check in loadAStack()
Changed paths:
engines/voyeur/files_threads.cpp
diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp
index d0addc8..7261aa2 100644
--- a/engines/voyeur/files_threads.cpp
+++ b/engines/voyeur/files_threads.cpp
@@ -46,7 +46,7 @@ ThreadResource::ThreadResource(BoltFilesState &state, const byte *src):_vm(state
_stateFlags = 0;
_stateCount = 0;
_parseCount = 0;
- _nextStateId = -1;
+ _nextStateId = 0;
_threadInfoPtr = nullptr;
_playCommandsPtr = nullptr;
}
@@ -65,6 +65,9 @@ void ThreadResource::initThreadStruct(int idx, int id) {
bool ThreadResource::loadAStack(int stackId) {
if (_vm->_stampFlags & 1) {
+ if (stackId < 0)
+ error('loadAStack() - Invalid stackId %d', stackId);
+
unloadAStack(_stackId);
if (!_useCount[stackId]) {
BoltEntry &boltEntry = _vm->_stampLibPtr->boltEntry(_vm->_controlPtr->_memberIds[stackId]);
More information about the Scummvm-git-logs
mailing list