mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-28 14:43:52 +03:00
Stop printing 03d after escaped characters in logs (#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>
This commit is contained in:
parent
1c7db70835
commit
147e42239f
1 changed files with 1 additions and 1 deletions
|
@ -259,7 +259,7 @@ normalLoop:
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process naughty character
|
// 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
|
return totalWritten, err
|
||||||
}
|
}
|
||||||
i++
|
i++
|
||||||
|
|
Loading…
Reference in a new issue