Fixed bug where 64bit code was not browsed properly
This commit is contained in:
parent
abfca025d5
commit
a7fb4e85c9
|
@ -539,7 +539,7 @@ static int amx_BrowseRelocate(AMX *amx)
|
||||||
assert(OP_SYMBOL==126);
|
assert(OP_SYMBOL==126);
|
||||||
|
|
||||||
amx->sysreq_d=0; /* preset */
|
amx->sysreq_d=0; /* preset */
|
||||||
#if (defined __GNUC__ || defined ASM32 || defined JIT) && !defined __64BIT__
|
#if (defined __GNUC__ || defined ASM32 || defined JIT)
|
||||||
amx_Exec(amx, (cell*)(void*)&opcode_list, 0);
|
amx_Exec(amx, (cell*)(void*)&opcode_list, 0);
|
||||||
/* to use direct system requests, a function pointer must fit in a cell;
|
/* to use direct system requests, a function pointer must fit in a cell;
|
||||||
* because the native function's address will be stored as the parameter
|
* because the native function's address will be stored as the parameter
|
||||||
|
@ -927,7 +927,7 @@ int AMXAPI amx_Init(AMX *amx,void *program)
|
||||||
for (i=0; i<num; i++) {
|
for (i=0; i<num; i++) {
|
||||||
amx_AlignCell(&fs->address); /* redundant, because it should be zero */
|
amx_AlignCell(&fs->address); /* redundant, because it should be zero */
|
||||||
if (USENAMETABLE(hdr))
|
if (USENAMETABLE(hdr))
|
||||||
amx_Align32(&((AMX_FUNCSTUBNT*)fs)->nameofs);
|
amx_AlignCell(&((AMX_FUNCSTUBNT*)fs)->nameofs);
|
||||||
fs=(AMX_FUNCSTUB*)((unsigned char *)fs+hdr->defsize);
|
fs=(AMX_FUNCSTUB*)((unsigned char *)fs+hdr->defsize);
|
||||||
} /* for */
|
} /* for */
|
||||||
|
|
||||||
|
@ -937,7 +937,7 @@ int AMXAPI amx_Init(AMX *amx,void *program)
|
||||||
for (i=0; i<num; i++) {
|
for (i=0; i<num; i++) {
|
||||||
amx_AlignCell(&fs->address);
|
amx_AlignCell(&fs->address);
|
||||||
if (USENAMETABLE(hdr))
|
if (USENAMETABLE(hdr))
|
||||||
amx_Align32(&((AMX_FUNCSTUBNT*)fs)->nameofs);
|
amx_AlignCell(&((AMX_FUNCSTUBNT*)fs)->nameofs);
|
||||||
fs=(AMX_FUNCSTUB*)((unsigned char *)fs+hdr->defsize);
|
fs=(AMX_FUNCSTUB*)((unsigned char *)fs+hdr->defsize);
|
||||||
} /* for */
|
} /* for */
|
||||||
|
|
||||||
|
@ -947,7 +947,7 @@ int AMXAPI amx_Init(AMX *amx,void *program)
|
||||||
for (i=0; i<num; i++) {
|
for (i=0; i<num; i++) {
|
||||||
amx_AlignCell(&fs->address);
|
amx_AlignCell(&fs->address);
|
||||||
if (USENAMETABLE(hdr))
|
if (USENAMETABLE(hdr))
|
||||||
amx_Align32(&((AMX_FUNCSTUBNT*)fs)->nameofs);
|
amx_AlignCell(&((AMX_FUNCSTUBNT*)fs)->nameofs);
|
||||||
fs=(AMX_FUNCSTUB*)((unsigned char *)fs+hdr->defsize);
|
fs=(AMX_FUNCSTUB*)((unsigned char *)fs+hdr->defsize);
|
||||||
} /* for */
|
} /* for */
|
||||||
|
|
||||||
|
@ -962,7 +962,7 @@ int AMXAPI amx_Init(AMX *amx,void *program)
|
||||||
for (i=0; i<num; i++) {
|
for (i=0; i<num; i++) {
|
||||||
amx_AlignCell(&fs->address);
|
amx_AlignCell(&fs->address);
|
||||||
if (USENAMETABLE(hdr))
|
if (USENAMETABLE(hdr))
|
||||||
amx_Align32(&((AMX_FUNCSTUBNT*)fs)->nameofs);
|
amx_AlignCell(&((AMX_FUNCSTUBNT*)fs)->nameofs);
|
||||||
fs=(AMX_FUNCSTUB*)((unsigned char *)fs+hdr->defsize);
|
fs=(AMX_FUNCSTUB*)((unsigned char *)fs+hdr->defsize);
|
||||||
} /* for */
|
} /* for */
|
||||||
} /* local */
|
} /* local */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user