diff options
author | Paul Gilbert | 2011-07-10 20:28:22 +1000 |
---|---|---|
committer | Paul Gilbert | 2011-07-10 20:28:22 +1000 |
commit | c3a4ba8b053b93a3f759af2a77922a886bba986e (patch) | |
tree | b9dbaad053fb43dda8f6f7a2644860409d58d4b5 | |
parent | 9b5b88274e4d0f76b280133624343f8ce7222937 (diff) | |
download | scummvm-rg350-c3a4ba8b053b93a3f759af2a77922a886bba986e.tar.gz scummvm-rg350-c3a4ba8b053b93a3f759af2a77922a886bba986e.tar.bz2 scummvm-rg350-c3a4ba8b053b93a3f759af2a77922a886bba986e.zip |
CGE: More fixes for free/delete[] mismatches
-rw-r--r-- | engines/cge/cge_main.cpp | 2 | ||||
-rw-r--r-- | engines/cge/game.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp index a4d110eac6..68a69ff64e 100644 --- a/engines/cge/cge_main.cpp +++ b/engines/cge/cge_main.cpp @@ -214,7 +214,7 @@ void CGEEngine::loadGame(XFile &file, bool tiny = false) { // Read the data into a data buffer int size = file.size() - file.mark(); - byte *dataBuffer = new byte[size]; + byte *dataBuffer = (byte *)malloc(size); file.read(dataBuffer, size); Common::MemoryReadStream readStream(dataBuffer, size, DisposeAfterUse::YES); Common::Serializer s(&readStream, NULL); diff --git a/engines/cge/game.cpp b/engines/cge/game.cpp index f2ebc0b4f8..18c4efbe00 100644 --- a/engines/cge/game.cpp +++ b/engines/cge/game.cpp @@ -31,7 +31,7 @@ namespace CGE { uint8 *glass(Dac *pal, uint8 r, uint8 g, uint8 b) { - uint8 *x = new uint8[256]; + uint8 *x = (uint8 *)malloc(256); if (x) { uint16 i; for (i = 0; i < 256; i++) { |