aboutsummaryrefslogtreecommitdiffstats
path: root/util/format.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-07-03 04:24:13 +0200
committerKim Alvefur <zash@zash.se>2021-07-03 04:24:13 +0200
commitf179b18e2bcf524d31cfc547b4b17e7013270c5f (patch)
tree9164b9936937053754d2448b2400c1d3f8c15cc7 /util/format.lua
parent943b7419b875d405fa1edf47d21d76108c2fe1aa (diff)
downloadprosody-f179b18e2bcf524d31cfc547b4b17e7013270c5f.tar.gz
prosody-f179b18e2bcf524d31cfc547b4b17e7013270c5f.zip
util.format: Fix missing backslash in pattern
Made the pattern match a longer range than intended, but with no effect since those characters are not present in the 'control_symbols' table.
Diffstat (limited to 'util/format.lua')
-rw-r--r--util/format.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/format.lua b/util/format.lua
index 72f909b8..52388081 100644
--- a/util/format.lua
+++ b/util/format.lua
@@ -60,7 +60,7 @@ local function format(formatstring, ...)
args[i] = dump(arg);
spec = "%s";
elseif option == "s" then
- args[i] = tostring(arg):gsub("[%z\1-31\127]", control_symbols);
+ args[i] = tostring(arg):gsub("[%z\1-\31\127]", control_symbols);
elseif type(arg) ~= "number" then -- arg isn't number as expected?
args[i] = tostring(arg);
spec = "[%s]";