aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorBastien Bouclet2017-11-25 19:33:45 +0100
committerBastien Bouclet2017-11-26 08:51:36 +0100
commit1e593a4e69051d615a7f5810c416837c69cd1b50 (patch)
tree1abd6501db4b0aec76a47b54f8a4fd0cbf377a51 /engines/fullpipe
parent0bd2e53cd49f21f3db4b6c8b762033ce1320172f (diff)
downloadscummvm-rg350-1e593a4e69051d615a7f5810c416837c69cd1b50.tar.gz
scummvm-rg350-1e593a4e69051d615a7f5810c416837c69cd1b50.tar.bz2
scummvm-rg350-1e593a4e69051d615a7f5810c416837c69cd1b50.zip
FULLPIPE: Fix out of bounds string access
abe1c65d626a8f3 changed _trackName from a char * to a Common::String, but still tried to access the null terminator byte.
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/sound.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp
index b1d0a26cf5..31e35808f9 100644
--- a/engines/fullpipe/sound.cpp
+++ b/engines/fullpipe/sound.cpp
@@ -332,7 +332,7 @@ int FullpipeEngine::getSceneTrack() {
int track = num + 1;
- if (!_trackName[num + 2])
+ if (num + 2 >= (int)_trackName.size())
track = 0;
_musicGameVar->setSubVarAsInt("TRACKS", track);