[Scummvm-git-logs] scummvm master -> 6fbc9046112bcfae5393c879fa9e999ba6c0279b
bluegr
noreply at scummvm.org
Sun Jul 26 00:03:55 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
6fbc904611 NANCY: Fix SecondaryMovie overread
Commit: 6fbc9046112bcfae5393c879fa9e999ba6c0279b
https://github.com/scummvm/scummvm/commit/6fbc9046112bcfae5393c879fa9e999ba6c0279b
Author: tunnelsociety (tunnelsociety at mm.st)
Date: 2026-07-26T03:03:50+03:00
Commit Message:
NANCY: Fix SecondaryMovie overread
The SecondaryVideoDescription's width and/or height sometimes doesn't match
the decoded video. (The original games draw some garbage pixels on rare
occasions.)
Fix #17016
Changed paths:
engines/nancy/action/secondarymovie.cpp
diff --git a/engines/nancy/action/secondarymovie.cpp b/engines/nancy/action/secondarymovie.cpp
index a8779baeaf1..2f418ec4d23 100644
--- a/engines/nancy/action/secondarymovie.cpp
+++ b/engines/nancy/action/secondarymovie.cpp
@@ -757,8 +757,24 @@ void PlaySecondaryMovie::execute() {
srcRect = Common::Rect(_fullFrame.w, _fullFrame.h);
}
+ Common::Rect destRect = _videoDescs[descID].destRect;
+
+ // The videoDesc's size might be larger than the decoded video (for example, nancy10's
+ // COR_AceFidgetEars_ANIM, and nancy12's PAR_ArcadeAnimationB); clamp here to avoid
+ // reading out-of-bounds during draw. (Adjust destRect too: avoid stretching)
+ const int16 decodedWidth = (int16)_decoder.getWidth();
+ if (srcRect.width() > decodedWidth) {
+ srcRect.setWidth(decodedWidth);
+ destRect.setWidth(decodedWidth);
+ }
+ const int16 decodedHeight = (int16)_decoder.getHeight();
+ if (srcRect.height() > decodedHeight) {
+ srcRect.setHeight(decodedHeight);
+ destRect.setHeight(decodedHeight);
+ }
+
_drawSurface.create(_fullFrame, srcRect);
- moveTo(_videoDescs[descID].destRect);
+ moveTo(destRect);
_needsRedraw = true;
More information about the Scummvm-git-logs
mailing list