[git commit master 1/1] unicode: update unicode_width on !unicode branch too. Closes bug 2593

Denys Vlasenko vda.linux at googlemail.com
Thu Oct 28 22:50:09 UTC 2010


commit: http://git.busybox.net/busybox/commit/?id=6b3f0b0dab46d910f7797dfc8d8554546dd33fa2
branch: http://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 libbb/unicode.c |    7 +++++--
 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;
 	}
 
-- 
1.7.1



More information about the busybox-cvs mailing list