1
0
mirror of https://github.com/moparisthebest/minetest synced 2024-12-21 23:28:48 -05:00

Initialize TileAnimationParams to prevent crashes/bugs for legacy invocations of add_particle{,spawner} (fixes #5108)

This commit is contained in:
sfan5 2017-01-24 15:19:29 +01:00
parent 59fdf57134
commit 0cde270bf5

View File

@ -51,6 +51,7 @@ int ModApiParticles::l_add_particle(lua_State *L)
bool collisiondetection, vertical, collision_removal;
collisiondetection = vertical = collision_removal = false;
struct TileAnimationParams animation;
animation.type = TAT_NONE;
std::string texture = "";
std::string playername = "";
@ -155,6 +156,7 @@ int ModApiParticles::l_add_particlespawner(lua_State *L)
bool collisiondetection, vertical, collision_removal;
collisiondetection = vertical = collision_removal = false;
struct TileAnimationParams animation;
animation.type = TAT_NONE;
ServerActiveObject *attached = NULL;
std::string texture = "";
std::string playername = "";