aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Bouclet2016-10-17 08:06:24 +0200
committerBastien Bouclet2016-10-18 13:13:00 +0200
commit1d349e82445dcc003f15b1f552e9fbbe91a33315 (patch)
tree7da49993b1b6230e443a43f71a2ca4af77a96d01
parent6ef67b9186535f8058dabfbbd181ad3ad032e079 (diff)
downloadscummvm-rg350-1d349e82445dcc003f15b1f552e9fbbe91a33315.tar.gz
scummvm-rg350-1d349e82445dcc003f15b1f552e9fbbe91a33315.tar.bz2
scummvm-rg350-1d349e82445dcc003f15b1f552e9fbbe91a33315.zip
VIDEO: Fix an off-by-one check in VideoDecoder::getTrack
-rw-r--r--video/video_decoder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp
index 217b4c8456..05b6e7ce2a 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];