diff options
author | zeripath | 2021-12-19 21:35:29 +0000 |
---|---|---|
committer | GitHub | 2021-12-19 21:35:29 +0000 |
commit | 48bd54286cceb6450c63adced0e7b17b3fe09c3c (patch) | |
tree | 937bdf1704e796f2e3f46f0ab1d3b6dfd9089d78 | |
parent | c69b3b65f3c0c39c0fccbab3db763661ca37740b (diff) |
Stop printing 03d after escaped characters in logs (#18030) (#18034)
Backport #18030
Strangely a weird bug was present in the log escaping code whereby any escaped
character would gain 03d - this was due to a mistake in the format string where
it should have read %03o but read instead %o03d. This has led to spurious 03d
trailing characters on these escaped characters!
Signed-off-by: Andrew Thornton <art27@cantab.net>
-rw-r--r-- | modules/log/colors.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/log/colors.go b/modules/log/colors.go index 5d56fd739..ad3120ee6 100644 --- a/modules/log/colors.go +++ b/modules/log/colors.go @@ -259,7 +259,7 @@ normalLoop: } // Process naughty character - if _, err := fmt.Fprintf(c.w, `\%#o03d`, bytes[i]); err != nil { + if _, err := fmt.Fprintf(c.w, `\%#03o`, bytes[i]); err != nil { return totalWritten, err } i++ |