diff options
-rw-r--r-- | engines/toon/toon.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index b54b3a7f1d..7478ed67f1 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -92,7 +92,7 @@ void ToonEngine::init() { _currentTextLineY = 0; _currentTextLineCharacterId = 0; - _saveBufferStream = new Common::MemoryWriteStreamDynamic(); + _saveBufferStream = new Common::MemoryWriteStreamDynamic(DisposeAfterUse::YES); _firstFrame = false; @@ -3210,8 +3210,8 @@ bool ToonEngine::loadGame(int32 slot) { break; } } - _saveBufferStream->write(buf, size); + delete[] buf; } delete loadFile; return true; |