[Scummvm-git-logs] scummvm master -> 1d349e82445dcc003f15b1f552e9fbbe91a33315

bgK bastien.bouclet at gmail.com
Tue Oct 18 13:13:28 CEST 2016


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:
1d349e8244 VIDEO: Fix an off-by-one check in VideoDecoder::getTrack


Commit: 1d349e82445dcc003f15b1f552e9fbbe91a33315
    https://github.com/scummvm/scummvm/commit/1d349e82445dcc003f15b1f552e9fbbe91a33315
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2016-10-18T13:13:00+02:00

Commit Message:
VIDEO: Fix an off-by-one check in VideoDecoder::getTrack

Changed paths:
    video/video_decoder.cpp



diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp
index 217b4c8..05b6e7c 100644
--- a/video/video_decoder.cpp
+++ b/video/video_decoder.cpp
@@ -826,14 +826,14 @@ void VideoDecoder::setEndFrame(uint frame) {
 }
 
 VideoDecoder::Track *VideoDecoder::getTrack(uint track) {
-	if (track > _internalTracks.size())
+	if (track >= _internalTracks.size())
 		return 0;
 
 	return _internalTracks[track];
 }
 
 const VideoDecoder::Track *VideoDecoder::getTrack(uint track) const {
-	if (track > _internalTracks.size())
+	if (track >= _internalTracks.size())
 		return 0;
 
 	return _internalTracks[track];





More information about the Scummvm-git-logs mailing list