forked from Mirrorlandia_minetest/minetest
Fix inability to change metadata using stack:to_table() (#5547)
This commit is contained in:
parent
1399678ffd
commit
83508277ce
@ -234,6 +234,8 @@ int LuaItemStack::l_to_table(lua_State *L)
|
|||||||
for (StringMap::const_iterator it = fields.begin();
|
for (StringMap::const_iterator it = fields.begin();
|
||||||
it != fields.end(); ++it) {
|
it != fields.end(); ++it) {
|
||||||
const std::string &name = it->first;
|
const std::string &name = it->first;
|
||||||
|
if (name.empty())
|
||||||
|
continue;
|
||||||
const std::string &value = it->second;
|
const std::string &value = it->second;
|
||||||
lua_pushlstring(L, name.c_str(), name.size());
|
lua_pushlstring(L, name.c_str(), name.size());
|
||||||
lua_pushlstring(L, value.c_str(), value.size());
|
lua_pushlstring(L, value.c_str(), value.size());
|
||||||
|
Loading…
Reference in New Issue
Block a user