Closed
Description
On x64 builds with VS 2015 the ALIGN_DOWN macro produces wrong addresses if the address is larger than 2^32. VS 2015 also produces a warning
MemoryModule.c(247): warning C4319: '~': zero extending 'DWORD' to 'uintptr_t' of greater size
The same applies to ALIGN_VALUE_UP.
A possible solution could be replacing the definition of ALIGN_DOWN and ALIGN_VALUE_UP by
define ALIGN_DOWN(address, alignment) (LPVOID)((uintptr_t)(address) & ~(((uintptr_t)(alignment)) - 1))
define ALIGN_VALUE_UP(value, alignment) (((value) + ((uintptr_t)(alignment)) - 1) & ~(((uintptr_t)(alignment)) - 1))
Metadata
Metadata
Assignees
Labels
No labels