mirror of
https://github.com/minetest/minetest.git
synced 2024-12-23 22:52:25 +01:00
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();
|
||||
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());
|
||||
|
Loading…
Reference in New Issue
Block a user