mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r2976) -Fix: Align settings pool items to the size of void* to fix bus errors on 64bit architectures which require aligned variables
This commit is contained in:
parent
7ee0b8ac86
commit
35ce780bb6
|
@ -50,7 +50,7 @@ static void *pool_alloc(SettingsMemoryPool **pool, uint size)
|
|||
uint pos;
|
||||
SettingsMemoryPool *p = *pool;
|
||||
|
||||
size = ALIGN(size, 4); // align everything to a 32 bit boundary
|
||||
size = ALIGN(size, sizeof(void*));
|
||||
|
||||
// first check if there's memory in the next pool
|
||||
if (p->next && p->next->pos + size <= p->next->size) {
|
||||
|
|
Loading…
Reference in New Issue