From 52e8a46524ed1916e59338b8802c4fcf706f0dfc Mon Sep 17 00:00:00 2001 From: jp Date: Thu, 26 Nov 2015 15:55:55 +0100 Subject: [PATCH] Mailbox : use a different pattern regex --- mailbox.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mailbox.lua b/mailbox.lua index 94658ca..8c62c13 100644 --- a/mailbox.lua +++ b/mailbox.lua @@ -72,12 +72,12 @@ local function img_col(stack) if not stack then return "" end if stack.type == "node" then if stack.inventory_image ~= "" then - return string.match(stack.inventory_image, "([%w_]+)")..".png" + return stack.inventory_image:match("([%w_]+)%.png")..".png" else - return string.match(stack.tiles[1], "([%w_]+)")..".png" + return stack.tiles[1]:match("([%w_]+)%.png")..".png" end elseif stack.type == "tool" or stack.type == "craft" then - return string.match(stack.inventory_image, "([%w_]+)")..".png" + return stack.inventory_image:match("([%w_]+)%.png")..".png" else return "" end end