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

sev- noreply at scummvm.org
Sun Mar 31 16:15:00 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:
8eadcbc6bd DIRECTOR: Do not even try playing invalid transitions


Commit: 8eadcbc6bd217d7d94e2bd348fb939ccac73b56c
    https://github.com/scummvm/scummvm/commit/8eadcbc6bd217d7d94e2bd348fb939ccac73b56c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2024-03-31T18:14:49+02:00

Commit Message:
DIRECTOR: Do not even try playing invalid transitions

Changed paths:
    engines/director/transitions.cpp


diff --git a/engines/director/transitions.cpp b/engines/director/transitions.cpp
index cff26962029..b5c7e69c7fe 100644
--- a/engines/director/transitions.cpp
+++ b/engines/director/transitions.cpp
@@ -156,9 +156,9 @@ 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;
+	if (transType < 1 || transType > ARRAYSIZE(transProps) - 1) {
+		warning("playTransition(): transType is not in [1..%d]: %d", ARRAYSIZE(transProps) - 1, transType);
+		return;
 	}
 
 	t.type = transType;




More information about the Scummvm-git-logs mailing list