[Scummvm-git-logs] scummvm master -> e3fc9b822672a2a7446b0ab0765c1fcde018f9a9

aquadran noreply at scummvm.org
Wed Jan 5 23:07:20 UTC 2022


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:
e3fc9b8226 VIDEO: Silence Sanitizer runtime error


Commit: e3fc9b822672a2a7446b0ab0765c1fcde018f9a9
    https://github.com/scummvm/scummvm/commit/e3fc9b822672a2a7446b0ab0765c1fcde018f9a9
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2022-01-06T00:07:14+01:00

Commit Message:
VIDEO: Silence Sanitizer runtime error

Changed paths:
    video/bink_decoder.cpp


diff --git a/video/bink_decoder.cpp b/video/bink_decoder.cpp
index 59823775744..8242200f0d3 100644
--- a/video/bink_decoder.cpp
+++ b/video/bink_decoder.cpp
@@ -1233,7 +1233,7 @@ void BinkDecoder::BinkVideoTrack::readDCTCoeffs(VideoFrame &video, int32 *block,
 	coefList[listEnd] = 3;  modeList[listEnd++] = 3;
 
 	int bits = video.bits->getBits(4) - 1;
-	for (int mask = 1 << bits; bits >= 0; mask >>= 1, bits--) {
+	for (int mask = bits >= 0 ? 1 << bits : 0; bits >= 0; mask >>= 1, bits--) {
 		int listPos = listStart;
 
 		while (listPos < listEnd) {




More information about the Scummvm-git-logs mailing list