nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] sbr/fmt_scan.c: cpstripped(): assert(w >= 0) Failure.


From: David Levine
Subject: Re: [Nmh-workers] sbr/fmt_scan.c: cpstripped(): assert(w >= 0) Failure.
Date: Mon, 24 Apr 2017 21:02:20 -0400

Ralph wrote:

> 80a9e99f7078199500d2d53c8d77d1b92af06fbc added an assert(3) as part of
> the -width-overflow fix for Valdis's email.

Right.  If w < 0, bad things happen in the code just following.  If
w can indeed be negative there, maybe that code block should be simply
skipped.

> any problems, in C or en_GB.utf8 locale, but it seems quite possible to
> me that the wcwidth() of a `mbtowc() < 0' could be -1, as above?

wcwidth() should be negative only if wide_char is non-printable.
The code checks if iswcntrl() or iswspace(), and if so, skips the
assert and output.  If it is a wide control character, then it's not
printable, right?

David



reply via email to

[Prev in Thread] Current Thread [Next in Thread]