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>
Tue, 12 Dec 2017 18:19:04 +0000 (19:19 +0100)
builtin/game/item.lua

index c7cbdd988c141bbf24274e7f017f9115bd082cd2..5e5696ff5fdb644865bde851afaaf63f6b59eeec 100644 (file)
@@ -516,7 +516,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