mirror of
https://https.git.savannah.gnu.org/git/diffutils.git
synced 2026-01-27 01:44:20 +00:00
diff: tweak mbrtoc32 use
* src/side.c (print_half_line): Use more-intuitive way to test whether mbrtoc32 found a non-null character.
This commit is contained in:
parent
d4a63b11fc
commit
bdc8608705
@ -138,7 +138,7 @@ print_half_line (char const *const *line, intmax_t indent, intmax_t out_bound)
|
||||
char32_t wc;
|
||||
size_t bytes = mbrtoc32 (&wc, tp0, text_limit - tp0, &mbstate);
|
||||
|
||||
if (0 < bytes && bytes < (size_t) -2)
|
||||
if (0 < bytes && bytes <= MB_LEN_MAX)
|
||||
{
|
||||
int width = c32width (wc);
|
||||
if (0 < width)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user