]> git.lizzy.rs Git - xdecor.git/commitdiff
Ench. table : fix crash when clicking ench. button quickly after moved an enchanted...
authorkilbith <jeanpatrick.guerrero@gmail.com>
Thu, 4 Feb 2016 20:57:46 +0000 (21:57 +0100)
committerkilbith <jeanpatrick.guerrero@gmail.com>
Thu, 4 Feb 2016 20:57:46 +0000 (21:57 +0100)
enchanting.lua

index 16e0eae67b6b2e5cc8a3a310af2c6c6a2b56f220..399d3b4f24ef1c686dedae1684d55e21903ea4c9 100644 (file)
@@ -83,7 +83,7 @@ function enchanting.fields(pos, _, fields)
        local mese = inv:get_stack("mese", 1)
        local orig_wear = tool:get_wear()
        local mod, name = tool:get_name():match("(.*):(.*)")
-       local enchanted_tool = mod..":enchanted_"..name.."_"..next(fields)
+       local enchanted_tool = (mod or "")..":enchanted_"..(name or "").."_"..next(fields)
 
        if mese:get_count() >= mese_cost and minetest.registered_tools[enchanted_tool] then
                tool:replace(enchanted_tool)