diff options
author | numberZero <silverunicorn2011@yandex.ru> | 2017-04-12 18:51:07 +0400 |
---|---|---|
committer | SmallJoker <SmallJoker@users.noreply.github.com> | 2017-04-12 16:51:07 +0200 |
commit | 83508277ce57720ee833bea125388a99cbe4e20d (patch) | |
tree | 41ec341f66cd62e711bd97706364588d5978ea5d /src/script | |
parent | 1399678ffd6faa2ae1642ada1b1b9dc729d6357a (diff) | |
download | minetest-83508277ce57720ee833bea125388a99cbe4e20d.tar.gz minetest-83508277ce57720ee833bea125388a99cbe4e20d.tar.bz2 minetest-83508277ce57720ee833bea125388a99cbe4e20d.zip |
Fix inability to change metadata using stack:to_table() (#5547)
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/lua_api/l_item.cpp | 2 |
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()); |