mirror of
https://github.com/vivier/EMILE.git
synced 2025-01-02 21:30:29 +00:00
Align memory allocation
This commit is contained in:
parent
4132ea5993
commit
f4ba7af2a5
@ -19,13 +19,15 @@ char* load_image(unsigned long offset, unsigned long size)
|
||||
if (size == 0)
|
||||
return NULL;
|
||||
|
||||
image = malloc(size);
|
||||
image = malloc(size + 4);
|
||||
if (image == 0)
|
||||
{
|
||||
free(image);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
image = (char*)(((unsigned long)image + 3) & 0xFFFFFFFC);
|
||||
|
||||
memset(¶m_block, 0, sizeof(param_block));
|
||||
|
||||
param_block.ioBuffer = (unsigned long)image;
|
||||
|
Loading…
Reference in New Issue
Block a user