[server] Match amx_Exec(...)

This commit is contained in:
RD42
2024-06-21 21:14:12 +08:00
parent 431a1e394f
commit 9f2b5cfb1e

View File

@ -1720,7 +1720,7 @@ static const void * const amx_opcodelist[] = {
return AMX_ERR_NOTFOUND; return AMX_ERR_NOTFOUND;
if ((amx->flags & AMX_FLAG_RELOC)==0) if ((amx->flags & AMX_FLAG_RELOC)==0)
return AMX_ERR_INIT; return AMX_ERR_INIT;
assert((amx->flags & AMX_FLAG_BROWSE)==0); //assert((amx->flags & AMX_FLAG_BROWSE)==0);
/* set up the registers */ /* set up the registers */
hdr=(AMX_HEADER *)amx->base; hdr=(AMX_HEADER *)amx->base;
@ -2093,8 +2093,11 @@ static const void * const amx_opcodelist[] = {
cip=JUMPABS(code, cip); /* jump to the address */ cip=JUMPABS(code, cip); /* jump to the address */
NEXT(cip); NEXT(cip);
op_call_pri: op_call_pri:
/*
PUSH((unsigned char *)cip-code); PUSH((unsigned char *)cip-code);
cip=(cell *)(code+(int)pri); cip=(cell *)(code+(int)pri);
*/
assert(0);
NEXT(cip); NEXT(cip);
op_jump: op_jump:
/* since the GETPARAM() macro modifies cip, you cannot /* since the GETPARAM() macro modifies cip, you cannot
@ -2506,7 +2509,10 @@ static const void * const amx_opcodelist[] = {
SKIPPARAM(1); SKIPPARAM(1);
NEXT(cip); NEXT(cip);
op_jump_pri: op_jump_pri:
/*
cip=(cell *)(code+(int)pri); cip=(cell *)(code+(int)pri);
*/
assert(0);
NEXT(cip); NEXT(cip);
op_switch: { op_switch: {
cell *cptr; cell *cptr;
@ -3065,8 +3071,11 @@ int AMXAPI amx_Exec(AMX *amx, cell *retval, int index)
cip=JUMPABS(code, cip); /* jump to the address */ cip=JUMPABS(code, cip); /* jump to the address */
break; break;
case OP_CALL_PRI: case OP_CALL_PRI:
/*
PUSH((unsigned char *)cip-code); PUSH((unsigned char *)cip-code);
cip=(cell *)(code+(int)pri); cip=(cell *)(code+(int)pri);
*/
ABORT(amx,AMX_ERR_INVINSTR);
break; break;
case OP_JUMP: case OP_JUMP:
/* since the GETPARAM() macro modifies cip, you cannot /* since the GETPARAM() macro modifies cip, you cannot
@ -3473,7 +3482,10 @@ int AMXAPI amx_Exec(AMX *amx, cell *retval, int index)
SKIPPARAM(1); SKIPPARAM(1);
break; break;
case OP_JUMP_PRI: case OP_JUMP_PRI:
/*
cip=(cell *)(code+(int)pri); cip=(cell *)(code+(int)pri);
*/
ABORT(amx,AMX_ERR_INVINSTR);
break; break;
case OP_SWITCH: { case OP_SWITCH: {
cell *cptr; cell *cptr;