CGE: More fixes for free/delete[] mismatches

This commit is contained in:
Paul Gilbert 2011-07-10 20:28:22 +10:00
parent 9b5b88274e
commit c3a4ba8b05
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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++) {