fix for getFuncsNum() on invalid forward
This commit is contained in:
parent
918e1c3195
commit
61525e9638
@ -451,11 +451,19 @@ cell CForwardMngr::executeForwards(int id, cell *params)
|
||||
|
||||
const char *CForwardMngr::getFuncName(int id) const
|
||||
{
|
||||
if (!isIdValid(id))
|
||||
{
|
||||
return "";
|
||||
}
|
||||
return (id & 1) ? m_SPForwards[id >> 1]->getFuncName() : m_Forwards[id >> 1]->getFuncName();
|
||||
}
|
||||
|
||||
int CForwardMngr::getFuncsNum(int id) const
|
||||
{
|
||||
if (!isIdValid(id))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return (id & 1) ? m_SPForwards[id >> 1]->getFuncsNum() : m_Forwards[id >> 1]->getFuncsNum();
|
||||
}
|
||||
|
||||
@ -466,6 +474,10 @@ int CForwardMngr::getParamsNum(int id) const
|
||||
|
||||
ForwardParam CForwardMngr::getParamType(int id, int paramNum) const
|
||||
{
|
||||
if (!isIdValid(id))
|
||||
{
|
||||
return FP_DONE;
|
||||
}
|
||||
return (id & 1) ? m_SPForwards[id >> 1]->getParamType(paramNum) : m_Forwards[id >> 1]->getParamType(paramNum);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user