Re: [Mutt] #2882: segfaults in uxterm with > 254 columns if there
#2882: segfaults in uxterm with > 254 columns if there are single byte
Comment (by pdmef):
Replying to [comment:4 Sertaç Ö. Yıldız]:
> Just as a side note: each '│' character (U+2502 BOX DRAWINGS LIGHT
> VERTICAL) in index_format still causes a two characters wide offset on
> right after padding.
Yeah. A fix is easy:
* zero the destination when entering the function
* re-compute col right after the {{{ch = *src++}}} line for right-padding
But this would be a hot-fix only. mutt_FormatString() isn't obviously
completely multibyte-safe:
* it doesn't allow padding with multibyte chars
* the default is to add each byte one by one from the input to the output
and increment __both__, the current column counter and the number written
so far (column is wrong for multibyte input)
...while the latter one now causes trouble.
I'm in favor of fixing the latter issue, so I won't commit the above "fix"
as it only fights the symptoms.
--
Ticket URL: <http://dev.mutt.org/trac/ticket/2882#comment:5>