[Scummvm-cvs-logs] scummvm master -> 29da6e5b9bf7c1328a6e08f37c8d67228143293a

lordhoto lordhoto at gmail.com
Sun May 4 18:28:06 CEST 2014


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
ea359fe92a ZVISION: Fix out of bounds access.
29da6e5b9b ZVISION: Small cleanup.


Commit: ea359fe92a0d64ed49910366c3d58dc582d22a71
    https://github.com/scummvm/scummvm/commit/ea359fe92a0d64ed49910366c3d58dc582d22a71
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2014-05-04T18:25:36+02:00

Commit Message:
ZVISION: Fix out of bounds access.

Changed paths:
    engines/zvision/sound/zork_raw.cpp



diff --git a/engines/zvision/sound/zork_raw.cpp b/engines/zvision/sound/zork_raw.cpp
index 55353ac..a0441a5 100644
--- a/engines/zvision/sound/zork_raw.cpp
+++ b/engines/zvision/sound/zork_raw.cpp
@@ -192,7 +192,7 @@ Audio::RewindableAudioStream *makeRawZorkStream(const Common::String &filePath,
 			}
 		}
 	} else if (engine->getGameId() == GID_GRANDINQUISITOR) {
-		for (int i = 0; i < 6; ++i) {
+		for (uint i = 0; i < ARRAYSIZE(RawZorkStream::_zgiSoundParamLookupTable); ++i) {
 			if (RawZorkStream::_zgiSoundParamLookupTable[i].identifier == fileIdentifier) {
 				soundParams = RawZorkStream::_zgiSoundParamLookupTable[i];
 				foundParams = true;


Commit: 29da6e5b9bf7c1328a6e08f37c8d67228143293a
    https://github.com/scummvm/scummvm/commit/29da6e5b9bf7c1328a6e08f37c8d67228143293a
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2014-05-04T18:26:31+02:00

Commit Message:
ZVISION: Small cleanup.

Changed paths:
    engines/zvision/sound/zork_raw.cpp



diff --git a/engines/zvision/sound/zork_raw.cpp b/engines/zvision/sound/zork_raw.cpp
index a0441a5..edee1fd 100644
--- a/engines/zvision/sound/zork_raw.cpp
+++ b/engines/zvision/sound/zork_raw.cpp
@@ -185,7 +185,7 @@ Audio::RewindableAudioStream *makeRawZorkStream(const Common::String &filePath,
 	char fileIdentifier = (engine->getGameId() == GID_NEMESIS) ? fileName[6] : fileName[7];
 
 	if (engine->getGameId() == GID_NEMESIS) {
-		for (int i = 0; i < 6; ++i) {
+		for (uint i = 0; i < ARRAYSIZE(RawZorkStream::_zNemSoundParamLookupTable); ++i) {
 			if (RawZorkStream::_zNemSoundParamLookupTable[i].identifier == fileIdentifier) {
 				soundParams = RawZorkStream::_zNemSoundParamLookupTable[i];
 				foundParams = true;






More information about the Scummvm-git-logs mailing list