From: sfan5 Date: Tue, 24 Jan 2017 14:19:29 +0000 (+0100) Subject: Initialize TileAnimationParams to prevent crashes/bugs for legacy invocations of... X-Git-Tag: 0.4.16~493 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0cde270bf59c151e9a2f668631cd11b0d03f35ae;p=oweals%2Fminetest.git Initialize TileAnimationParams to prevent crashes/bugs for legacy invocations of add_particle{,spawner} (fixes #5108) --- 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 = "";