Fix memory alignment (#187)
This commit is contained in:
parent
7627092478
commit
5b151634a5
|
@ -307,6 +307,8 @@ bool heapBlockAllocate(Heap* heap, int* handleIndexPtr, int size, int a4)
|
|||
int blockSize;
|
||||
HeapHandle* handle;
|
||||
|
||||
size += 4 - size % 4;
|
||||
|
||||
if (heap == NULL || handleIndexPtr == NULL || size == 0) {
|
||||
goto err;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue