diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2022-06-02 20:54:02 +0200 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2022-06-02 20:54:02 +0200 |
commit | 827b9f8d7054158b058679999d77c1345162a293 (patch) | |
tree | b03741002579b03d3657c1e496e73993e4070fa9 /src/script/lua_api/l_item.cpp | |
parent | 3ff3103e98b350712543f926c429ab339700e252 (diff) | |
parent | 9fc018ded10225589d2559d24a5db739e891fb31 (diff) | |
download | dragonfireclient-827b9f8d7054158b058679999d77c1345162a293.tar.xz |
Merge branch 'master' of https://github.com/minetest/minetest
Diffstat (limited to 'src/script/lua_api/l_item.cpp')
-rw-r--r-- | src/script/lua_api/l_item.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/script/lua_api/l_item.cpp b/src/script/lua_api/l_item.cpp index 9220259ff..bae6701a0 100644 --- a/src/script/lua_api/l_item.cpp +++ b/src/script/lua_api/l_item.cpp @@ -599,6 +599,9 @@ int ModApiItemMod::l_register_item_raw(lua_State *L) // be done if (f.name == "ignore") return 0; + // This would break everything + if (f.name.empty()) + throw LuaError("Cannot register node with empty name"); content_t id = ndef->set(f.name, f); |