mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
fixed crash bug
This commit is contained in:
parent
6d91af30b8
commit
c1d75857f3
@ -314,9 +314,10 @@ int CForwardMngr::registerSPForward(const char *funcName, AMX *amx, int numParam
|
|||||||
CSPForward *pForward;
|
CSPForward *pForward;
|
||||||
if (m_FreeSPForwards.size())
|
if (m_FreeSPForwards.size())
|
||||||
{
|
{
|
||||||
pForward = m_SPForwards[m_FreeSPForwards.back()];
|
retVal = m_FreeSPForwards.back();
|
||||||
m_FreeSPForwards.pop_back();
|
m_FreeSPForwards.pop_back();
|
||||||
pForward->Set(funcName, amx, numParams, paramTypes);
|
pForward = m_SPForwards[retVal>>1]; // >>1 because unregisterSPForward pushes the id which contains the sp flag
|
||||||
|
pForward->Set(funcName, amx, numParams, paramTypes);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user