diff options
author | Paul Gilbert | 2014-08-31 08:53:50 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-08-31 08:53:50 -0400 |
commit | c96247ca573fe315f92473331e8276e328daab03 (patch) | |
tree | 0703dcdc37cc75122beb1e8fb628750bcdd5367f /engines/mads/nebular | |
parent | ec634ea07c24143e3e1736fec8934d120018fbd6 (diff) | |
download | scummvm-rg350-c96247ca573fe315f92473331e8276e328daab03.tar.gz scummvm-rg350-c96247ca573fe315f92473331e8276e328daab03.tar.bz2 scummvm-rg350-c96247ca573fe315f92473331e8276e328daab03.zip |
MADS: Fix some memory leaks
Diffstat (limited to 'engines/mads/nebular')
-rw-r--r-- | engines/mads/nebular/nebular_scenes.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/mads/nebular/nebular_scenes.cpp b/engines/mads/nebular/nebular_scenes.cpp index c71512ed4c..b5e2491624 100644 --- a/engines/mads/nebular/nebular_scenes.cpp +++ b/engines/mads/nebular/nebular_scenes.cpp @@ -331,7 +331,7 @@ void SceneInfoNebular::loadCodes(MSurface &depthSurface, Common::SeekableReadStr byte runValue = stream->readByte(); // Write out the run length - Common::fill(destP, destP + runLength, runValue); + Common::fill(destP, MIN(endP, destP + runLength), runValue); destP += runLength; // Get the next run length |