# HG changeset patch # User Kim Alvefur # Date 1409708148 -7200 # Node ID d87195d53d8426f1c19b8924a37d4a8302b79cfa # Parent ec8878113907c6fb36cdac2b4d7e99900db9a27a# Parent 3f4809d01783bb57121f05fcde2be4b35a40a9f2 Merge 0.10->trunk diff -r ec8878113907 -r d87195d53d84 util/hex.lua --- a/util/hex.lua Tue Sep 02 22:34:32 2014 +0200 +++ b/util/hex.lua Wed Sep 03 03:35:48 2014 +0200 @@ -8,11 +8,11 @@ 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