aboutsummaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
Diffstat (limited to 'src/script')
-rw-r--r--src/script/common/c_packer.cpp2
-rw-r--r--src/script/lua_api/l_particleparams.h9
2 files changed, 7 insertions, 4 deletions
diff --git a/src/script/common/c_packer.cpp b/src/script/common/c_packer.cpp
index ede00c758..597f5e447 100644
--- a/src/script/common/c_packer.cpp
+++ b/src/script/common/c_packer.cpp
@@ -568,7 +568,7 @@ void script_dump_packed(const PackedValue *val)
printf("table(%d, %d)", i.uidata1, i.uidata2);
break;
case LUA_TFUNCTION:
- printf("function(%d byte)", i.sdata.size());
+ printf("function(%lu byte)", i.sdata.size());
break;
case LUA_TUSERDATA:
printf("userdata %s %p", i.sdata.c_str(), i.ptrdata);
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;