aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/serialization.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/serialization.lua b/util/serialization.lua
index 628c9d33..cc230238 100644
--- a/util/serialization.lua
+++ b/util/serialization.lua
@@ -217,7 +217,7 @@ local function new(opt)
return '"' .. s_gsub(s, "[%z\1-\31\"\'\\\127-\255]", string_escapes) .. '"';
end
- if hex then
+ if type(hex) == "string" then
function types.string(s)
local esc = serialize_string(s);
if #esc > (#s*2+2+#hex) then