Fix unsafe cast in l_object
This commit is contained in:
parent
2bdf4955c8
commit
2c3593b51e
@ -1409,7 +1409,7 @@ int ObjectRef::l_set_physics_override(lua_State *L)
|
|||||||
{
|
{
|
||||||
NO_MAP_LOCK_REQUIRED;
|
NO_MAP_LOCK_REQUIRED;
|
||||||
ObjectRef *ref = checkobject(L, 1);
|
ObjectRef *ref = checkobject(L, 1);
|
||||||
PlayerSAO *playersao = (PlayerSAO *) getobject(ref);
|
PlayerSAO *playersao = getplayersao(ref);
|
||||||
if (playersao == nullptr)
|
if (playersao == nullptr)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@ -1449,7 +1449,7 @@ int ObjectRef::l_get_physics_override(lua_State *L)
|
|||||||
{
|
{
|
||||||
NO_MAP_LOCK_REQUIRED;
|
NO_MAP_LOCK_REQUIRED;
|
||||||
ObjectRef *ref = checkobject(L, 1);
|
ObjectRef *ref = checkobject(L, 1);
|
||||||
PlayerSAO *playersao = (PlayerSAO *)getobject(ref);
|
PlayerSAO *playersao = getplayersao(ref);
|
||||||
if (playersao == nullptr)
|
if (playersao == nullptr)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user