1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-24 17:50:37 +01:00

Added security in invtweak in case node breakers dig nodes

This commit is contained in:
LeMagnesium 2015-04-21 23:31:24 +02:00
parent 4b2944e11b
commit eafe217291

View File

@ -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(),