Cleanup: make grumpy asan happy and do not use new []
to allocate data freed by free()
.
Probably nothing crucial, but asan build would crash on that stupid glitch... Annoying.
This commit is contained in:
parent
091832c955
commit
0dbc9060a6
@ -60,6 +60,7 @@
|
||||
#include <PixelFormat.h>
|
||||
|
||||
#include <stdio.h> // printf
|
||||
#include <stdlib.h> // malloc
|
||||
#include <math.h> // sqrt
|
||||
#include <sys/types.h>
|
||||
|
||||
@ -1147,7 +1148,7 @@ void* DirectDrawSurface::readData(uint &rsize)
|
||||
uint size = stream.size - header_size;
|
||||
rsize = size;
|
||||
|
||||
unsigned char *data = new unsigned char[size];
|
||||
unsigned char *data = (unsigned char *)malloc(sizeof(*data) * size);
|
||||
|
||||
stream.seek(header_size);
|
||||
mem_read(stream, data, size);
|
||||
|
Loading…
Reference in New Issue
Block a user