From 6b3f0b0dab46d910f7797dfc8d8554546dd33fa2 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 29 Oct 2010 00:50:09 +0200 Subject: unicode: update unicode_width on !unicode branch too. Closes bug 2593 Signed-off-by: Denys Vlasenko --- libbb/unicode.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libbb/unicode.c') diff --git a/libbb/unicode.c b/libbb/unicode.c index 70c6abe00..cf0c6bed9 100644 --- a/libbb/unicode.c +++ b/libbb/unicode.c @@ -1005,8 +1005,11 @@ static char* FAST_FUNC unicode_conv_to_printable2(uni_stat_t *stats, const char d++; } } - if (stats) - stats->byte_count = stats->unicode_count = (d - dst); + if (stats) { + stats->byte_count = (d - dst); + stats->unicode_count = (d - dst); + stats->unicode_width = (d - dst); + } return dst; } -- cgit v1.2.3