From: tenplus1 Date: Thu, 30 Aug 2018 18:32:33 +0000 (+0100) Subject: get_node_drops: Make empty drop return empty table (#7592) X-Git-Tag: 5.0.0~243 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a4f41e7bfc6c2d823eab1465258617cb033a452c;p=oweals%2Fminetest.git get_node_drops: Make empty drop return empty table (#7592) This stops get_node_drops from returning an empty string when using drop = "" and instead returns the supposed empty table instead {} --- diff --git a/builtin/game/item.lua b/builtin/game/item.lua index 591531db0..9b7569c77 100644 --- a/builtin/game/item.lua +++ b/builtin/game/item.lua @@ -197,7 +197,7 @@ function core.get_node_drops(node, toolname) return {nodename} elseif type(drop) == "string" then -- itemstring drop - return {drop} + return drop ~= "" and {drop} or {} elseif drop.items == nil then -- drop = {} to disable default drop return {}