Skip to content
Permalink
Browse files

Initialize TileAnimationParams to prevent crashes/bugs for legacy inv…

…ocations of add_particle{,spawner} (fixes #5108)
  • Loading branch information...
sfan5 committed Jan 24, 2017
1 parent 59fdf57 commit 0cde270bf59c151e9a2f668631cd11b0d03f35ae
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/script/lua_api/l_particles.cpp
@@ -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 = "";

0 comments on commit 0cde270

Please sign in to comment.
You can’t perform that action at this time.