]> diplodocus.org Git - nmh/commit
sbr/fmt_scan.c: Fix `foo%-42{bar}' right-justification bug.
authorRalph Corderoy <ralph@inputplus.co.uk>
Wed, 10 May 2017 11:13:28 +0000 (12:13 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Wed, 10 May 2017 11:13:28 +0000 (12:13 +0100)
commit7083c89c5461aa345eec1e47e5fb047d31832c7a
treef9b15d1ee4e815f1fc1f8ca596d1465e160aaf3a
parent571d5e7543fd73aeb77af653a8d1b20d78c84b48
sbr/fmt_scan.c: Fix `foo%-42{bar}' right-justification bug.

The space padding was added at the start of the output buffer, not the
start of the component being formatted.  Caused by 92128dac's move to
dynamic allocation for fmt_scan()'s output.  Only shows if the component
isn't at the start of the buffer.  Expand existing
test/format/test-rightjustify to cover this.
sbr/fmt_scan.c
test/format/test-rightjustify