From 1e593a4e69051d615a7f5810c416837c69cd1b50 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Sat, 25 Nov 2017 19:33:45 +0100 Subject: 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. --- engines/fullpipe/sound.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3