Fix regression in vstk size (#894)

* Fix regression in vstk size

* Fix macro comment mistake

* More macro comment removals
This commit is contained in:
Michael Flaherty 2018-10-04 05:08:29 -07:00 committed by Nicholas Hastings
parent fc14e37d0f
commit 22b43e3869

View File

@ -321,10 +321,10 @@ static cell_t CS_TerminateRound(IPluginContext *pContext, const cell_t *params)
{
REGISTER_NATIVE_ADDR("TerminateRound",
PassInfo pass[2]; \
pass[0].flags = PASSFLAG_BYVAL; \ // delay
pass[0].flags = PASSFLAG_BYVAL; \
pass[0].type = PassType_Basic; \
pass[0].size = sizeof(float); \
pass[1].flags = PASSFLAG_BYVAL; \ // reason
pass[1].flags = PASSFLAG_BYVAL; \
pass[1].type = PassType_Basic; \
pass[1].size = sizeof(int); \
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, pass, 2))
@ -350,16 +350,16 @@ static cell_t CS_TerminateRound(IPluginContext *pContext, const cell_t *params)
{
REGISTER_NATIVE_ADDR("TerminateRound",
PassInfo pass[4]; \
pass[0].flags = PASSFLAG_BYVAL; \ // delay
pass[0].flags = PASSFLAG_BYVAL; \
pass[0].type = PassType_Basic; \
pass[0].size = sizeof(float); \
pass[1].flags = PASSFLAG_BYVAL; \ // reason
pass[1].flags = PASSFLAG_BYVAL; \
pass[1].type = PassType_Basic; \
pass[1].size = sizeof(int); \
pass[2].flags = PASSFLAG_BYVAL; \ // unknown
pass[2].flags = PASSFLAG_BYVAL; \
pass[2].type = PassType_Basic; \
pass[2].size = sizeof(int); \
pass[3].flags = PASSFLAG_BYVAL; \ // unknown2
pass[3].flags = PASSFLAG_BYVAL; \
pass[3].type = PassType_Basic; \
pass[3].size = sizeof(int); \
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, pass, 4))
@ -368,7 +368,7 @@ static cell_t CS_TerminateRound(IPluginContext *pContext, const cell_t *params)
if (params[3] == 1 && g_pTerminateRoundDetoured)
g_pIgnoreTerminateDetour = true;
unsigned char vstk[sizeof(void *) + sizeof(float)+ sizeof(int)];
unsigned char vstk[sizeof(void *) + sizeof(float) + (sizeof(int)*3)];
unsigned char *vptr = vstk;
*(void **)vptr = gamerules;