Skip to content

Commit ce846d4

Browse files
committed
Handle Valve_VirtualAddress SDKCall returns
1 parent 2152eb9 commit ce846d4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

extensions/sdktools/vcaller.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,13 @@ static cell_t SDKCall(IPluginContext *pContext, const cell_t *params)
535535
addr = *(bool **)addr;
536536
}
537537
return *addr ? 1 : 0;
538+
} else if (vc->retinfo->vtype == Valve_VirtualAddress) {
539+
void *addr = (void *)vc->retbuf;
540+
if (vc->retinfo->flags & PASSFLAG_ASPOINTER)
541+
{
542+
addr = *(void **)addr;
543+
}
544+
return g_pSM->ToPseudoAddress((void*)addr);
538545
} else {
539546
cell_t *addr = (cell_t *)vc->retbuf;
540547
if (vc->retinfo->flags & PASSFLAG_ASPOINTER)

0 commit comments

Comments
 (0)