LuaState: Fixed class value-getting off the stack.
This commit is contained in:
parent
06c66a08cd
commit
014a55a15a
@ -862,9 +862,9 @@ void cLuaState::GetStackValue(int a_StackPos, eWeather & a_ReturnedVal)
|
|||||||
void cLuaState::GetStackValue(int a_StackPos, pBoundingBox & a_ReturnedVal)
|
void cLuaState::GetStackValue(int a_StackPos, pBoundingBox & a_ReturnedVal)
|
||||||
{
|
{
|
||||||
tolua_Error err;
|
tolua_Error err;
|
||||||
if (tolua_isusertable(m_LuaState, a_StackPos, "cBoundingBox", false, &err))
|
if (tolua_isusertype(m_LuaState, a_StackPos, "cBoundingBox", false, &err))
|
||||||
{
|
{
|
||||||
a_ReturnedVal = (cBoundingBox *)lua_touserdata(m_LuaState, a_StackPos);
|
a_ReturnedVal = *((cBoundingBox **)lua_touserdata(m_LuaState, a_StackPos));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -875,9 +875,9 @@ void cLuaState::GetStackValue(int a_StackPos, pBoundingBox & a_ReturnedVal)
|
|||||||
void cLuaState::GetStackValue(int a_StackPos, pWorld & a_ReturnedVal)
|
void cLuaState::GetStackValue(int a_StackPos, pWorld & a_ReturnedVal)
|
||||||
{
|
{
|
||||||
tolua_Error err;
|
tolua_Error err;
|
||||||
if (tolua_isusertable(m_LuaState, a_StackPos, "cWorld", false, &err))
|
if (tolua_isusertype(m_LuaState, a_StackPos, "cWorld", false, &err))
|
||||||
{
|
{
|
||||||
a_ReturnedVal = (cWorld *)lua_touserdata(m_LuaState, a_StackPos);
|
a_ReturnedVal = *((cWorld **)lua_touserdata(m_LuaState, a_StackPos));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user