1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Fix segfault in deprecation logging due to tail call, log by default (#10174)

This commit is contained in:
rubenwardy 2020-10-31 18:19:23 +00:00 committed by GitHub
parent 2dff3dd03f
commit 89dd05fdf3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 71 additions and 80 deletions

View file

@ -2278,7 +2278,6 @@ void ObjectRef::Register(lua_State *L)
lua_pop(L, 1); // drop metatable
markAliasDeprecated(methods);
luaL_openlib(L, 0, methods, 0); // fill methodtable
lua_pop(L, 1); // drop methodtable
}
@ -2316,10 +2315,9 @@ luaL_Reg ObjectRef::methods[] = {
luamethod(ObjectRef, get_nametag_attributes),
luamethod_aliased(ObjectRef, set_velocity, setvelocity),
luamethod(ObjectRef, add_velocity),
{"add_player_velocity", ObjectRef::l_add_velocity},
luamethod_aliased(ObjectRef, add_velocity, add_player_velocity),
luamethod_aliased(ObjectRef, get_velocity, getvelocity),
{"get_player_velocity", ObjectRef::l_get_velocity},
luamethod_dep(ObjectRef, get_velocity, get_player_velocity),
// LuaEntitySAO-only
luamethod_aliased(ObjectRef, set_acceleration, setacceleration),