From 6a3b71d4b4e547a4fbe0239d3bddab88b10ab8d1 Mon Sep 17 00:00:00 2001 From: kilbith Date: Thu, 4 Feb 2016 21:57:46 +0100 Subject: [PATCH] Ench. table : fix crash when clicking ench. button quickly after moved an enchanted tool --- enchanting.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enchanting.lua b/enchanting.lua index 16e0eae..399d3b4 100644 --- a/enchanting.lua +++ b/enchanting.lua @@ -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)