HomeFreeBSD

strfmon: Fix formatting of a second fixed-width value

Description

strfmon: Fix formatting of a second fixed-width value

There is a bug when formatting two consecutive values using fixed-widths
and the values need padding. This was because the value of pad_size
was zeroed only every other time.

Format Before After
[%8n] [%8n] [ $123.45] [ $123.45] [ $123.45] [ $123.45]

Reviewed by: kib
PR: 267282
Github PR: #619
MFC after: 1 week

Details

Provenance
jlduranAuthored on Oct 21 2022, 7:34 PM
kibCommitted on Oct 25 2022, 9:40 PM
Parents
rG750fe3e6a461: strfmon: Fix an edge case when sep_by_space is 2
Branches
Unknown
Tags
Unknown