Software /
code /
prosody
Changeset
9483:903e0cfd4cc9
util.serialization: Make check of prefix for optional hex encoding stricter
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 11 Oct 2018 22:59:26 +0200 |
parents | 9482:8791bfa3984a |
children | 9484:1d1541630c20 |
files | util/serialization.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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