From 732c8008f495bc344957bd0ccbd4010adb939207 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Wed, 20 May 2020 20:13:16 +0200 Subject: CSM: Fix crashing minetest.get_item_def() fixes #9884 --- src/script/common/c_content.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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"); } -- cgit v1.2.3