aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/scumm.cpp
diff options
context:
space:
mode:
authorMax Horn2008-04-04 11:43:26 +0000
committerMax Horn2008-04-04 11:43:26 +0000
commit74f80acbf09bbefca149d9db648effd7b3114c54 (patch)
tree9a94fb82d03aa9b51ebf9ce19c54725e22fcc53d /engines/scumm/scumm.cpp
parente36b95b64a0a830f94eed17687cbc078fde05c22 (diff)
downloadscummvm-rg350-74f80acbf09bbefca149d9db648effd7b3114c54.tar.gz
scummvm-rg350-74f80acbf09bbefca149d9db648effd7b3114c54.tar.bz2
scummvm-rg350-74f80acbf09bbefca149d9db648effd7b3114c54.zip
Properly *init* the _fmtownsBuf variable, and properly release the memory it points to when restarting
svn-id: r31381
Diffstat (limited to 'engines/scumm/scumm.cpp')
-rw-r--r--engines/scumm/scumm.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 3a93fae0fa..bc5a208b30 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -528,6 +528,8 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
else
_compositeBuf = 0;
+ _fmtownsBuf = 0;
+
_herculesBuf = 0;
if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) {
_herculesBuf = (byte *)malloc(Common::kHercW * Common::kHercH);
@@ -1198,8 +1200,8 @@ void ScummEngine::setupScumm() {
Graphics::initfonts();
#endif
- _fmtownsBuf = 0;
if (_game.platform == Common::kPlatformFMTowns && _language == Common::JA_JPN) {
+ free(_fmtownsBuf);
_fmtownsBuf = (byte *)malloc(_screenWidth * _textSurfaceMultiplier * _screenHeight * _textSurfaceMultiplier);
}