nmh-workers
[Top] [All Lists]

[Nmh-workers] Bug in 1.7 mh-format numeric output

2017-11-21 13:50:47
So, I guess I had slacked off a bit, as I wasn't really running 1.7
everywhere I thought it was.  When I finally corrected that, I noticed
my scan output wasn't aligned anymore.  This is probably the easiest
way to demonstrate it:

1.6:

% fmttest -raw -format '%3(num 5000)' dummy
?00

1.7:
% fmttest -raw -format '%3(num 5000)' dummy
?000

I guess we never had a test which exercised this particular thing; whoops.
It seems this was introduced in commit 92128dacf, as part of the conversion
of the format engine to charstring_t.  Looking at the previous version of
cpnumber() (the offending function) it seems the issue was when the '?'
marking truncation was inserted, it simply REPLACED the last character
inserted, but now it's just appended to the string.

This seems like easy enough to fix; my only question is, is this worth
doing a 1.7.1?  Part of me says yes, since this a change to LONG standing
MH behavior.  What do others think?

--Ken

-- 
Nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>