Builtin: Fix handle_node_drops crash with nil digger
authorSmallJoker <mk939@ymail.com>
Tue, 12 Dec 2017 18:19:04 +0000 (19:19 +0100)
committerSmallJoker <mk939@ymail.com>
Sun, 3 Jun 2018 15:32:00 +0000 (17:32 +0200)
builtin/game/item.lua

index 09e3ea99907c8abe102f58a0bf304e3da8d64dae..d4ce6002fe0900d91488a641bceb6f216090eb02 100644 (file)
@@ -519,7 +519,8 @@ function core.handle_node_drops(pos, drops, digger)
                end
        else
                give_item = function(item)
-                       return item
+                       -- itemstring to ItemStack for left:is_empty()
+                       return ItemStack(item)
                end
        end