diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-08-16 06:54:04 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-08-16 06:54:04 -0700 |
commit | ae2dc9643abab6b6f15e2f5fa6c8596e0010494e (patch) | |
tree | 87d2e0e473d1140d6497076409a442f59d669fd9 /syslog.h | |
parent | f90f54c07d9839ffeb823cb529d9bbc3076dda18 (diff) | |
download | txr-ae2dc9643abab6b6f15e2f5fa6c8596e0010494e.tar.gz txr-ae2dc9643abab6b6f15e2f5fa6c8596e0010494e.tar.bz2 txr-ae2dc9643abab6b6f15e2f5fa6c8596e0010494e.zip |
format: bug: sign not reset before each conversion.
For instance, this bad output is produced:
(pic "+0####.## <<<<<" 123 1) -> "+00123.00 +1 "
The second argument should not have any leading + sign.
* stream.c (formatv): For each new conversion specifier introduced by ~,
reset the sign variable to zero also. That's the semantic change here,
occluded by the fact that I'm rearranging the declaration of the
variables, adding comments, and condensing the assignments while also
getting them into the same order as the declarations, in order that this
sort of bug does not creep in in the future, should another such
variable be added.
* tests/018/format.tl: Adding correct version of above test case.
Diffstat (limited to 'syslog.h')
0 files changed, 0 insertions, 0 deletions