[Scummvm-git-logs] scummvm master -> 8737ca7c14229f818438cc780109cb8ec04fd957
mduggan
noreply at scummvm.org
Sun Mar 16 02:31:30 UTC 2025
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:
8737ca7c14 DGDS: Ignore invalid frame draw ops in CDS scripts
Commit: 8737ca7c14229f818438cc780109cb8ec04fd957
https://github.com/scummvm/scummvm/commit/8737ca7c14229f818438cc780109cb8ec04fd957
Author: Matthew Duggan (mgithub at guarana.org)
Date: 2025-03-16T13:21:55+11:00
Commit Message:
DGDS: Ignore invalid frame draw ops in CDS scripts
There is an invalid frame referenced in some CDS scripts, etc F1B32.CDS.
Ignore these requests.
This fixes #15800.
Changed paths:
engines/dgds/head.cpp
diff --git a/engines/dgds/head.cpp b/engines/dgds/head.cpp
index 54b643cfcef..7a8e3c5662a 100644
--- a/engines/dgds/head.cpp
+++ b/engines/dgds/head.cpp
@@ -263,7 +263,11 @@ void CDSTTMInterpreter::handleOperation(TTMEnviro &env_, TTMSeq &seq, uint16 op,
Common::SharedPtr<Image> img = env._scriptShapes[bmpNo];
if (flip & kImageFlipH)
x = env._xOff + (env._scriptShapes[0]->width(0) - ivals[0] - img->width(frameno));
- img->drawBitmap(frameno, x, y, seq._drawWin, _vm->_compositionBuffer, flip, img->width(frameno), img->height(frameno));
+ if (frameno >= img->loadedFrameCount()) {
+ warning("CDS script tried to draw frame %d but img only has %d", frameno, img->loadedFrameCount());
+ } else {
+ img->drawBitmap(frameno, x, y, seq._drawWin, _vm->_compositionBuffer, flip, img->width(frameno), img->height(frameno));
+ }
break;
}
case 0xc220: // PLAY RAW SFX
More information about the Scummvm-git-logs
mailing list