mirror of
https://github.com/minetest/minetest.git
synced 2025-02-17 10:23:47 +01:00
Fix inability to change metadata using stack:to_table() (#5547)
This commit is contained in:
@ -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());
|
||||||
|
Reference in New Issue
Block a user