From eafe217291b68150451c490b23584d884ae14627 Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Tue, 21 Apr 2015 23:31:24 +0200 Subject: [PATCH] Added security in invtweak in case node breakers dig nodes --- mods/invtweak/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/invtweak/init.lua b/mods/invtweak/init.lua index 928580fc..c14ce98a 100644 --- a/mods/invtweak/init.lua +++ b/mods/invtweak/init.lua @@ -272,7 +272,7 @@ minetest.register_on_dignode(function(pos, oldnode, digger) local new = item:get_wear() if old ~= new then - if old > 0 and new == 0 then + if old and old > 0 and new == 0 then wielded.wear[name] = new minetest.sound_play("invtweak_tool_break", { pos = digger:getpos(),