From 5b9e1a53ad4c2baca32dbb3fce22230cc7e8bc40 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Fri, 23 Nov 2018 20:51:43 -0800 Subject: GLK: FROTZ: Fix mismatch allocation/free --- engines/glk/frotz/mem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines') diff --git a/engines/glk/frotz/mem.cpp b/engines/glk/frotz/mem.cpp index 656b822ee6..19d2c3da3d 100644 --- a/engines/glk/frotz/mem.cpp +++ b/engines/glk/frotz/mem.cpp @@ -88,7 +88,7 @@ void Mem::initializeUndo() { void Mem::loadGameHeader() { // Load header - zmp = new byte[64]; + zmp = (byte *)malloc(64); story_fp->seek(0); story_fp->read(zmp, 64); @@ -236,7 +236,7 @@ void Mem::reset_memory() { undo_mem = nullptr; undo_count = 0; - delete[] zmp; + free(zmp); zmp = nullptr; } -- cgit v1.2.3