Permalink
Browse files

Fix regression in vstk size (#894)

* Fix regression in vstk size

* Fix macro comment mistake

* More macro comment removals
  • Loading branch information...
Headline committed Oct 4, 2018
1 parent ada56b0 commit 8803219dd5ea034e99b1bb96919c80056cd6f324
Showing with 7 additions and 7 deletions.
  1. +7 −7 extensions/cstrike/natives.cpp
@@ -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;

0 comments on commit 8803219

Please sign in to comment.