diff options
author | Paul Gilbert | 2015-07-29 08:29:00 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-07-29 08:29:00 -0400 |
commit | 9e5bd8609f04429ceaa218d1e5560e0d2d87c586 (patch) | |
tree | aef9b652413658a7e308c2a18a15182db8b5abc8 /engines/sherlock | |
parent | 8c46a7ef2a1ec19ec9a776890cdcf8ed3085369c (diff) | |
download | scummvm-rg350-9e5bd8609f04429ceaa218d1e5560e0d2d87c586.tar.gz scummvm-rg350-9e5bd8609f04429ceaa218d1e5560e0d2d87c586.tar.bz2 scummvm-rg350-9e5bd8609f04429ceaa218d1e5560e0d2d87c586.zip |
SHERLOCK: RT: Fix memory leaks
Diffstat (limited to 'engines/sherlock')
-rw-r--r-- | engines/sherlock/tattoo/tattoo_journal.cpp | 1 | ||||
-rw-r--r-- | engines/sherlock/tattoo/tattoo_map.cpp | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/engines/sherlock/tattoo/tattoo_journal.cpp b/engines/sherlock/tattoo/tattoo_journal.cpp index b7830620c1..cd8a94a884 100644 --- a/engines/sherlock/tattoo/tattoo_journal.cpp +++ b/engines/sherlock/tattoo/tattoo_journal.cpp @@ -61,6 +61,7 @@ void TattooJournal::show() { stream->read(palette, PALETTE_SIZE); screen.translatePalette(palette); ui.setupBGArea(palette); + delete stream; // Set screen to black, and set background screen._backBuffer1.blitFrom((*_journalImages)[0], Common::Point(0, 0)); diff --git a/engines/sherlock/tattoo/tattoo_map.cpp b/engines/sherlock/tattoo/tattoo_map.cpp index bcb7b60ab1..53a366b319 100644 --- a/engines/sherlock/tattoo/tattoo_map.cpp +++ b/engines/sherlock/tattoo/tattoo_map.cpp @@ -245,8 +245,10 @@ void TattooMap::loadData() { do { c = stream->readByte(); if (stream->pos() >= stream->size()) - return; + break; } while (c < '0' || c > '9'); + if (stream->pos() >= stream->size()) + break; // Get the scene number Common::String locStr; |