Fix linux getting incorrect stack size.
This commit is contained in:
parent
66d30ff793
commit
9bfc47801c
9
util.cpp
9
util.cpp
@ -35,19 +35,12 @@ size_t GetParamTypeSize(HookParamType type)
|
|||||||
return sizeof(void *);
|
return sizeof(void *);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t GetParamsSize(DHooksCallback *dg)
|
size_t GetParamsSize(DHooksCallback *dg)//Get the full size, this is for creating the STACK.
|
||||||
{
|
{
|
||||||
size_t res = 0;
|
size_t res = 0;
|
||||||
|
|
||||||
for (int i = dg->params.size() - 1; i >= 0; i--)
|
for (int i = dg->params.size() - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
#ifndef WIN32
|
|
||||||
if (dg->params.at(i).type == HookParamType_Object && (dg->params.at(i).flags & PASSFLAG_ODTOR)) //Passed by refrence
|
|
||||||
{
|
|
||||||
res += sizeof(void *);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
res += dg->params.at(i).size;
|
res += dg->params.at(i).size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user