[Scummvm-git-logs] scummvm master -> 8a75005b6e41be0234cb637eeca9f19ef08b8cbe

djsrv dservilla at gmail.com
Wed Jun 24 21:42:34 UTC 2020


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:
e9fd7544d4 DIRECTOR: Fix segfault
8a75005b6e DIRECTOR: LINGO: Don't load negative Lctx entries


Commit: e9fd7544d48d48b06224d8a9552d838309988ed4
    https://github.com/scummvm/scummvm/commit/e9fd7544d48d48b06224d8a9552d838309988ed4
Author: djsrv (dservilla at gmail.com)
Date: 2020-06-24T17:39:51-04:00

Commit Message:
DIRECTOR: Fix segfault

Changed paths:
    engines/director/score.cpp


diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 6e887011c2..747141468b 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -793,7 +793,7 @@ void Score::renderShape(uint16 spriteId) {
 Cast *Score::getCastMember(int castId) {
 	Cast *result = nullptr;
 
-	if (_loadedCast->contains(castId)) {
+	if (_loadedCast && _loadedCast->contains(castId)) {
 		result = _loadedCast->getVal(castId);
 	}
 	return result;


Commit: 8a75005b6e41be0234cb637eeca9f19ef08b8cbe
    https://github.com/scummvm/scummvm/commit/8a75005b6e41be0234cb637eeca9f19ef08b8cbe
Author: djsrv (dservilla at gmail.com)
Date: 2020-06-24T17:41:35-04:00

Commit Message:
DIRECTOR: LINGO: Don't load negative Lctx entries

Changed paths:
    engines/director/score-loading.cpp


diff --git a/engines/director/score-loading.cpp b/engines/director/score-loading.cpp
index afc01d5680..3d92a1f4a1 100644
--- a/engines/director/score-loading.cpp
+++ b/engines/director/score-loading.cpp
@@ -1059,12 +1059,12 @@ void Score::loadLingoContext(Common::SeekableSubReadStreamEndian &stream) {
 			stream.readUint16();
 			stream.readUint16();
 			stream.readUint16();
-			uint16 index = stream.readUint16();
+			int16 index = stream.readSint16();
 			stream.readUint16();
 			stream.readUint16();
 
 			// FIXME. Bytecode disabled by default, requires --debugflags=bytecode for now
-			if (_vm->getVersion() >= 4 && debugChannelSet(-1, kDebugBytecode)) {
+			if (index >= 0 && _vm->getVersion() >= 4 && debugChannelSet(-1, kDebugBytecode)) {
 				Common::SeekableSubReadStreamEndian *r;
 				_lingo->addCodeV4(*(r = _movieArchive->getResource(MKTAG('L', 's', 'c', 'r'), index)), _lingoArchive, _macName);
 				delete r;




More information about the Scummvm-git-logs mailing list