From: sfan5 Date: Wed, 20 May 2020 18:13:16 +0000 (+0200) Subject: CSM: Fix crashing minetest.get_item_def() X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=732c8008f495bc344957bd0ccbd4010adb939207;p=oweals%2Fminetest.git CSM: Fix crashing minetest.get_item_def() fixes #9884 --- diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp index 116a59c09..2157d087d 100644 --- a/src/script/common/c_content.cpp +++ b/src/script/common/c_content.cpp @@ -164,7 +164,7 @@ void push_item_definition_full(lua_State *L, const ItemDefinition &i) lua_setfield(L, -2, "usable"); lua_pushboolean(L, i.liquids_pointable); lua_setfield(L, -2, "liquids_pointable"); - if (i.type == ITEM_TOOL) { + if (i.tool_capabilities) { push_tool_capabilities(L, *i.tool_capabilities); lua_setfield(L, -2, "tool_capabilities"); }