From: Denys Vlasenko Date: Thu, 28 Oct 2010 22:50:09 +0000 (+0200) Subject: unicode: update unicode_width on !unicode branch too. Closes bug 2593 X-Git-Tag: 1_18_0~51 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6b3f0b0dab46d910f7797dfc8d8554546dd33fa2;p=oweals%2Fbusybox.git unicode: update unicode_width on !unicode branch too. Closes bug 2593 Signed-off-by: Denys Vlasenko --- 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; }