diff options
author | sfan5 <sfan5@live.de> | 2020-05-20 20:13:16 +0200 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2020-05-20 20:15:09 +0200 |
commit | 732c8008f495bc344957bd0ccbd4010adb939207 (patch) | |
tree | ef9a6b53e887bd37e42114c6b311bd91c4111ec5 /src/script/common | |
parent | c94d37827dd3a8be9dcc59bb693032ba7ea07922 (diff) | |
download | minetest-732c8008f495bc344957bd0ccbd4010adb939207.tar.gz minetest-732c8008f495bc344957bd0ccbd4010adb939207.tar.bz2 minetest-732c8008f495bc344957bd0ccbd4010adb939207.zip |
CSM: Fix crashing minetest.get_item_def()
fixes #9884
Diffstat (limited to 'src/script/common')
-rw-r--r-- | src/script/common/c_content.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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"); } |