diff options
author | Borja Lorente | 2016-08-13 19:12:05 +0200 |
---|---|---|
committer | Borja Lorente | 2016-08-19 16:29:17 +0200 |
commit | d1cd77208e9517c50a65a32f33dfe5ce5039ef1e (patch) | |
tree | e3950b69201b18927a3373576575ce479e7e4005 | |
parent | 28698ba697012edd1b3159400342d04b5d3df530 (diff) | |
download | scummvm-rg350-d1cd77208e9517c50a65a32f33dfe5ce5039ef1e.tar.gz scummvm-rg350-d1cd77208e9517c50a65a32f33dfe5ce5039ef1e.tar.bz2 scummvm-rg350-d1cd77208e9517c50a65a32f33dfe5ce5039ef1e.zip |
MACVENTURE: Fix mismatched new and delete[]
-rw-r--r-- | engines/macventure/container.h | 3 | ||||
-rw-r--r-- | engines/macventure/gui.cpp | 2 | ||||
-rw-r--r-- | engines/macventure/macventure.cpp | 6 |
3 files changed, 6 insertions, 5 deletions
diff --git a/engines/macventure/container.h b/engines/macventure/container.h index 1abab1c6d0..6979afbb4e 100644 --- a/engines/macventure/container.h +++ b/engines/macventure/container.h @@ -196,7 +196,8 @@ public: } - Common::SeekableReadStream *res = _res->readStream(getItemByteSize(id) * 2); + // HACK Should Limit the size of the stream returned + Common::SeekableReadStream *res = _res->readStream(_res->size() - _res->pos() + 1); return res; } diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp index bf8455eb91..ff14cf3b5d 100644 --- a/engines/macventure/gui.cpp +++ b/engines/macventure/gui.cpp @@ -171,8 +171,8 @@ void Gui::initGUI() { } void Gui::reloadInternals() { - loadGraphics(); clearAssets(); + loadGraphics(); } void Gui::draw() { diff --git a/engines/macventure/macventure.cpp b/engines/macventure/macventure.cpp index 9c601dde9c..16be24b2c4 100644 --- a/engines/macventure/macventure.cpp +++ b/engines/macventure/macventure.cpp @@ -1125,9 +1125,9 @@ bool MacVentureEngine::loadTextHuffman() { debugC(4, kMVDebugMain, "Text is huffman-encoded"); delete res; - delete masks; - delete lengths; - delete values; + delete[] masks; + delete[] lengths; + delete[] values; return true; } return false; |