From 59c44a7e17a04ccc62e64f8f6daf9831a576c841 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 4 Nov 2013 00:00:36 +0100 Subject: [PATCH] (RGL PS3) Use malloc instead of new for buffer --- ps3/rgl/src/ps3/rgl_ps3_cg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ps3/rgl/src/ps3/rgl_ps3_cg.cpp b/ps3/rgl/src/ps3/rgl_ps3_cg.cpp index 6da0222a5a..0e9cf3019d 100644 --- a/ps3/rgl/src/ps3/rgl_ps3_cg.cpp +++ b/ps3/rgl/src/ps3/rgl_ps3_cg.cpp @@ -4891,7 +4891,7 @@ int convertNvToElfFromMemory(const void *sourceData, size_t size, int endianness if (doSwap) { int size = (int)nvbr->ucode_size()/sizeof(uint32_t); - buffer = new uint32_t[size]; + buffer = (uint32_t*)malloc(size * sizeof(uint32_t)); for (int i = 0; i < size; i++) { @@ -4908,7 +4908,7 @@ int convertNvToElfFromMemory(const void *sourceData, size_t size, int endianness // !!!xxx this is to workaround what appears to be a linux platform specific bug // that manifests as a memory overwrite in properly allocated memory during a std::vector resize int size = (int)nvbr->ucode_size()/sizeof(uint32_t); - buffer = new uint32_t[size]; + buffer = (uint32_t*)malloc(size * sizeof(uint32_t)); for (int i = 0; i < size; i++) buffer[i] = tmp[i];