[Scummvm-cvs-logs] scummvm master -> 9e5bd8609f04429ceaa218d1e5560e0d2d87c586
dreammaster
dreammaster at scummvm.org
Wed Jul 29 14:29:59 CEST 2015
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
9e5bd8609f SHERLOCK: RT: Fix memory leaks
Commit: 9e5bd8609f04429ceaa218d1e5560e0d2d87c586
https://github.com/scummvm/scummvm/commit/9e5bd8609f04429ceaa218d1e5560e0d2d87c586
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-07-29T08:29:00-04:00
Commit Message:
SHERLOCK: RT: Fix memory leaks
Changed paths:
engines/sherlock/tattoo/tattoo_journal.cpp
engines/sherlock/tattoo/tattoo_map.cpp
diff --git a/engines/sherlock/tattoo/tattoo_journal.cpp b/engines/sherlock/tattoo/tattoo_journal.cpp
index b783062..cd8a94a 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 bcb7b60..53a366b 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;
More information about the Scummvm-git-logs
mailing list