aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sherlock/tattoo/tattoo_journal.cpp1
-rw-r--r--engines/sherlock/tattoo/tattoo_map.cpp4
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;