aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2022-07-30 12:51:23 +0100
committerGitHub <noreply@github.com>2022-07-30 12:51:23 +0100
commita8711158896d993e23d823f41ab086c3915c7d4e (patch)
tree4883ab0310ec344883b8042dea3195cd73717c2e /src/script/lua_api
parent6a269d58ef28be6428a5fb62c0eb966fc1ff5883 (diff)
downloadhax-minetest-server-a8711158896d993e23d823f41ab086c3915c7d4e.tar.gz
hax-minetest-server-a8711158896d993e23d823f41ab086c3915c7d4e.zip
Fix some warnings (#12615)
Diffstat (limited to 'src/script/lua_api')
-rw-r--r--src/script/lua_api/l_particleparams.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/script/lua_api/l_particleparams.h b/src/script/lua_api/l_particleparams.h
index 4fefc5e3a..03f11c07f 100644
--- a/src/script/lua_api/l_particleparams.h
+++ b/src/script/lua_api/l_particleparams.h
@@ -226,15 +226,18 @@ namespace LuaParticleParams
// get the effect settings
lua_getfield(L, -1, "style");
- lua_isnil(L,-1) || (readLuaValue(L, field.style), true);
+ if (!lua_isnil(L,-1))
+ readLuaValue(L, field.style);
lua_pop(L, 1);
lua_getfield(L, -1, "reps");
- lua_isnil(L,-1) || (readLuaValue(L, field.reps), true);
+ if (!lua_isnil(L,-1))
+ readLuaValue(L, field.reps);
lua_pop(L, 1);
lua_getfield(L, -1, "start");
- lua_isnil(L,-1) || (readLuaValue(L, field.beginning), true);
+ if (!lua_isnil(L,-1))
+ readLuaValue(L, field.beginning);
lua_pop(L, 1);
goto done;