[Scummvm-git-logs] scummvm master -> 3d8764c97e0b0e8eeb35c69c6935de3b8be4e276

sev- noreply at scummvm.org
Sun Mar 31 15:27:09 UTC 2024


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:
3d8764c97e DIRECTOR: Cap transType in trnasitions


Commit: 3d8764c97e0b0e8eeb35c69c6935de3b8be4e276
    https://github.com/scummvm/scummvm/commit/3d8764c97e0b0e8eeb35c69c6935de3b8be4e276
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-03-31T17:26:07+02:00

Commit Message:
DIRECTOR: Cap transType in trnasitions

Fixes crash in hhouse in the monster crusher where
transType is requested to be 55 out of 52

Changed paths:
    engines/director/transitions.cpp


diff --git a/engines/director/transitions.cpp b/engines/director/transitions.cpp
index dbc0556c18c..cff26962029 100644
--- a/engines/director/transitions.cpp
+++ b/engines/director/transitions.cpp
@@ -156,6 +156,11 @@ void Window::playTransition(uint frame, RenderMode mode, uint16 transDuration, u
 	// Play a transition and return the number of subframes rendered
 	TransParams t;
 
+	if (transType > ARRAYSIZE(transProps) - 1) {
+		warning("playTransition(): transType is too big: %d", transType);
+		transType = kTransDissolveBits;
+	}
+
 	t.type = transType;
 	t.duration = MAX<uint16>(250, transDuration); // When duration is < 1/4s, make it 1/4
 	t.frame = frame;




More information about the Scummvm-git-logs mailing list