aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2017-01-24 15:19:29 +0100
committersfan5 <sfan5@live.de>2017-01-24 15:19:29 +0100
commit0cde270bf59c151e9a2f668631cd11b0d03f35ae (patch)
tree01450353d8fff3cb79264d3d37572a594c3be8ad /src/script/lua_api
parent59fdf57134f62be8b8b4801c5f0fc4a2fca25f43 (diff)
downloadminetest-0cde270bf59c151e9a2f668631cd11b0d03f35ae.tar.gz
minetest-0cde270bf59c151e9a2f668631cd11b0d03f35ae.tar.bz2
minetest-0cde270bf59c151e9a2f668631cd11b0d03f35ae.zip
Initialize TileAnimationParams to prevent crashes/bugs for legacy invocations of add_particle{,spawner} (fixes #5108)
Diffstat (limited to 'src/script/lua_api')
-rw-r--r--src/script/lua_api/l_particles.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/script/lua_api/l_particles.cpp b/src/script/lua_api/l_particles.cpp
index 7f415844a..2f3e9a58d 100644
--- a/src/script/lua_api/l_particles.cpp
+++ b/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 = "";