Changeset

11646:b6ea0148ad37

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.
author Kim Alvefur <zash@zash.se>
date Sat, 03 Jul 2021 04:24:13 +0200
parents 11645:3be346c5b940
children 11647:0fe6a9a3676f
files util/format.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/format.lua	Sat Jul 03 03:24:26 2021 +0200
+++ b/util/format.lua	Sat Jul 03 04:24:13 2021 +0200
@@ -60,7 +60,7 @@
 				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]";