aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorjohndoe1232015-02-01 17:21:34 +0100
committerjohndoe1232015-02-01 17:21:34 +0100
commitaa518306b8a82e22806cdb9820a6ac217a06c16f (patch)
tree07c2fadbbdfac427cf792487087b361c9e99c963 /engines
parentf1ec648e456f94bb8d0fc7058192e1b988050976 (diff)
downloadscummvm-rg350-aa518306b8a82e22806cdb9820a6ac217a06c16f.tar.gz
scummvm-rg350-aa518306b8a82e22806cdb9820a6ac217a06c16f.tar.bz2
scummvm-rg350-aa518306b8a82e22806cdb9820a6ac217a06c16f.zip
BBVS: Fix out-of-bounds array access in air guitar minigame as reported by Coverity
Diffstat (limited to 'engines')
-rw-r--r--engines/bbvs/minigames/bbairguitar.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/bbvs/minigames/bbairguitar.cpp b/engines/bbvs/minigames/bbairguitar.cpp
index 6f198cb42a..26e27a966f 100644
--- a/engines/bbvs/minigames/bbairguitar.cpp
+++ b/engines/bbvs/minigames/bbairguitar.cpp
@@ -1121,7 +1121,7 @@ void MinigameBbAirGuitar::noteOff(int noteNum) {
if (_actionTrackPos + _ticksDelta > 15000)
_ticksDelta = 15000 - _actionTrackPos;
_track[_trackCount].ticks = _ticksDelta;
- if (_trackCount < 2048)
+ if (_trackCount + 1 < 2048)
++_trackCount;
_track[_trackCount].noteNum = -2;
_noteStartTime = _vm->_system->getMillis();