aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/disk_ns.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/parallaction/disk_ns.cpp')
-rw-r--r--engines/parallaction/disk_ns.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/parallaction/disk_ns.cpp b/engines/parallaction/disk_ns.cpp
index bd6c151cf1..2533d32d7c 100644
--- a/engines/parallaction/disk_ns.cpp
+++ b/engines/parallaction/disk_ns.cpp
@@ -283,7 +283,7 @@ Cnv* DosDisk_ns::loadExternalCnv(const char *filename) {
uint16 height = stream->readByte();
uint32 decsize = numFrames * width * height;
- byte *data = (byte*)malloc(decsize);
+ byte *data = new byte[decsize];
stream->read(data, decsize);
delete stream;
@@ -299,7 +299,7 @@ Frames* DosDisk_ns::loadCnv(const char *filename) {
uint16 width = stream->readByte();
uint16 height = stream->readByte();
uint32 decsize = numFrames * width * height;
- byte *data = (byte*)malloc(decsize);
+ byte *data = new byte[decsize];
Graphics::PackBitsReadStream decoder(*stream);
decoder.read(data, decsize);
@@ -836,7 +836,8 @@ Cnv* AmigaDisk_ns::makeCnv(Common::SeekableReadStream *stream, bool disposeStrea
stream->read(buf, rawsize);
uint32 decsize = numFrames * width * height;
- byte *data = (byte*)calloc(decsize, 1);
+ byte *data = new byte[decsize];
+ memset(data, 0, decsize);
unpackBitmap(data, buf, numFrames, bytesPerPlane, height);