aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/script/lua_api/l_item.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/script/lua_api/l_item.cpp b/src/script/lua_api/l_item.cpp
index 19b5b0955..2d32093a7 100644
--- a/src/script/lua_api/l_item.cpp
+++ b/src/script/lua_api/l_item.cpp
@@ -234,6 +234,8 @@ int LuaItemStack::l_to_table(lua_State *L)
for (StringMap::const_iterator it = fields.begin();
it != fields.end(); ++it) {
const std::string &name = it->first;
+ if (name.empty())
+ continue;
const std::string &value = it->second;
lua_pushlstring(L, name.c_str(), name.size());
lua_pushlstring(L, value.c_str(), value.size());