mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 16:13:46 +01:00
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;
|
||||
ObjectRef *ref = checkobject(L, 1);
|
||||
PlayerSAO *playersao = (PlayerSAO *) getobject(ref);
|
||||
PlayerSAO *playersao = getplayersao(ref);
|
||||
if (playersao == nullptr)
|
||||
return 0;
|
||||
|
||||
@ -1449,7 +1449,7 @@ int ObjectRef::l_get_physics_override(lua_State *L)
|
||||
{
|
||||
NO_MAP_LOCK_REQUIRED;
|
||||
ObjectRef *ref = checkobject(L, 1);
|
||||
PlayerSAO *playersao = (PlayerSAO *)getobject(ref);
|
||||
PlayerSAO *playersao = getplayersao(ref);
|
||||
if (playersao == nullptr)
|
||||
return 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user