mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
Properly *init* the _fmtownsBuf variable, and properly release the memory it points to when restarting
svn-id: r31381
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user