1
0
Fork 0

Cast it to a variable that has the same size as a pointer (64 bit)

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3848
This commit is contained in:
Peter Veenstra 2013-11-12 21:43:23 +00:00
parent 0d65d2956c
commit 625dcb3c28

View file

@ -596,7 +596,7 @@ static void cache_init(bool enable) {
if(!cache_code_start_ptr) E_Exit("Allocating dynamic cache failed");
// align the cache at a page boundary
cache_code=(Bit8u*)(((long)cache_code_start_ptr + PAGESIZE_TEMP-1) & ~(PAGESIZE_TEMP-1)); //MEM LEAK. store old pointer if you want to free it.
cache_code=(Bit8u*)(((Bitu)cache_code_start_ptr + PAGESIZE_TEMP-1) & ~(PAGESIZE_TEMP-1));//Bitu is same size as a pointer.
cache_code_link_blocks=cache_code;
cache_code=cache_code+PAGESIZE_TEMP;