mirror of
https://github.com/minetest/minetest.git
synced 2025-03-06 20:48:40 +01:00
Fix unsafe cast in l_object
This commit is contained in:
parent
2bdf4955c8
commit
2c3593b51e
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue