mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-10 07:12:03 +00:00
Fix segmentation faults on ODROID-XU3/XU4 running GNU/Linux, and probably other 32-bit ARM devices like older Raspberry Pis
This commit is contained in:
parent
684b016487
commit
44ac5ded31
1 changed files with 1 additions and 1 deletions
|
@ -242,7 +242,7 @@ void *Z_Malloc2(size_t size, INT32 tag, void *user, INT32 alignbits,
|
|||
void *Z_MallocAlign(size_t size, INT32 tag, void *user, INT32 alignbits)
|
||||
#endif
|
||||
{
|
||||
size_t extrabytes = (1<<alignbits) - 1;
|
||||
size_t extrabytes = (1<<alignbits) - (sizeof(size_t)*8 > (UINT32) alignbits); // only subtract 1 if the bit shift did not cause an overflow
|
||||
size_t padsize = 0;
|
||||
memblock_t *block;
|
||||
void *ptr;
|
||||
|
|
Loading…
Reference in a new issue