(RGL PS3) Use malloc instead of new for buffer
This commit is contained in:
parent
c0e6fc9b9f
commit
59c44a7e17
|
@ -4891,7 +4891,7 @@ int convertNvToElfFromMemory(const void *sourceData, size_t size, int endianness
|
||||||
if (doSwap)
|
if (doSwap)
|
||||||
{
|
{
|
||||||
int size = (int)nvbr->ucode_size()/sizeof(uint32_t);
|
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++)
|
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
|
// !!!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
|
// that manifests as a memory overwrite in properly allocated memory during a std::vector resize
|
||||||
int size = (int)nvbr->ucode_size()/sizeof(uint32_t);
|
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++)
|
for (int i = 0; i < size; i++)
|
||||||
buffer[i] = tmp[i];
|
buffer[i] = tmp[i];
|
||||||
|
|
Loading…
Reference in New Issue