summaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenys Vlasenko2010-10-29 00:50:09 +0200
committerDenys Vlasenko2010-10-29 00:50:09 +0200
commit6b3f0b0dab46d910f7797dfc8d8554546dd33fa2 (patch)
tree7399fa18cf6eb03941dbd999579673fa8e4c0ad4 /libbb
parentdc8ef353fd8ae0641a53c2507138155dcd5f76e7 (diff)
downloadbusybox-6b3f0b0dab46d910f7797dfc8d8554546dd33fa2.zip
busybox-6b3f0b0dab46d910f7797dfc8d8554546dd33fa2.tar.gz
unicode: update unicode_width on !unicode branch too. Closes bug 2593
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r--libbb/unicode.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libbb/unicode.c b/libbb/unicode.c
index 70c6abe..cf0c6be 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;
}