[Scummvm-cvs-logs] scummvm master -> a310feb8a562ddce2a45f4ae1b5b46206cdda692

Kirben kirben at optusnet.com.au
Thu Mar 6 05:07:41 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:
a310feb8a5 AGOS: Fix error when dumping all VGA scripts.


Commit: a310feb8a562ddce2a45f4ae1b5b46206cdda692
    https://github.com/scummvm/scummvm/commit/a310feb8a562ddce2a45f4ae1b5b46206cdda692
Author: Kirben (kirben at optusnet.com.au)
Date: 2014-03-05T20:06:54-08:00

Commit Message:
AGOS: Fix error when dumping all VGA scripts.

Changed paths:
    engines/agos/res.cpp



diff --git a/engines/agos/res.cpp b/engines/agos/res.cpp
index 4d91d1a..2631f79 100644
--- a/engines/agos/res.cpp
+++ b/engines/agos/res.cpp
@@ -802,7 +802,6 @@ void AGOSEngine::loadVGABeardFile(uint16 id) {
 		}
 	} else {
 		offs = _gameOffsetsPtr[id];
-
 		size = _gameOffsetsPtr[id + 1] - offs;
 		readGameFile(_vgaBufferPointers[11].vgaFile2, offs, size);
 	}
@@ -911,8 +910,16 @@ void AGOSEngine::loadVGAVideoFile(uint16 id, uint8 type, bool useError) {
 	} else {
 		id = id * 2 + (type - 1);
 		offs = _gameOffsetsPtr[id];
-
 		dstSize = _gameOffsetsPtr[id + 1] - offs;
+
+		if (!dstSize) {
+			if (useError)
+				error("loadVGAVideoFile: Can't load id %d type %d", id, type);
+
+			_block = _blockEnd = NULL;
+			return;
+		}
+
 		dst = allocBlock(dstSize + extraBuffer);
 		readGameFile(dst, offs, dstSize);
 	}






More information about the Scummvm-git-logs mailing list