From 2781a9aa2528fd7a21d4b07c553f7cab3377e4d9 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 3 Sep 2014 00:37:41 +0200 Subject: util.hex: Use locals! --- util/hex.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util/hex.lua') diff --git a/util/hex.lua b/util/hex.lua index 72fc22bd..b21ee17e 100644 --- a/util/hex.lua +++ b/util/hex.lua @@ -8,11 +8,11 @@ local function hex_to_char(h) return s_char(tonumber(h, 16)); end -function to(s) +local function to(s) return s:gsub(".", char_to_hex); end -function from(s) +local function from(s) return s:gsub("..", hex_to_char); end -- cgit v1.2.3