util/serialization.lua
changeset 9486 903e0cfd4cc9
parent 9483 006a71a83e6a
child 9487 1d1541630c20
--- a/util/serialization.lua	Thu Oct 11 22:50:45 2018 +0200
+++ b/util/serialization.lua	Thu Oct 11 22:59:26 2018 +0200
@@ -217,7 +217,7 @@
 		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