diff options
author | Denys Vlasenko <dvlasenk@redhat.com> | 2010-09-02 12:03:11 +0200 |
---|---|---|
committer | Denys Vlasenko <dvlasenk@redhat.com> | 2010-09-02 12:03:11 +0200 |
commit | 61a36af45d9342b65d16a3d29818cf4c70ec992d (patch) | |
tree | 6096e7f94cb9847ff36c91d6996e377f5e1dd654 /libbb/unicode.c | |
parent | b068bd7a4189f86d55b22242ec65e2ad56a9d719 (diff) | |
download | busybox-w32-61a36af45d9342b65d16a3d29818cf4c70ec992d.tar.gz busybox-w32-61a36af45d9342b65d16a3d29818cf4c70ec992d.tar.bz2 busybox-w32-61a36af45d9342b65d16a3d29818cf4c70ec992d.zip |
lineedit: fix completion with Unicode chars
function old new delta
read_line_input 4966 5002 +36
bb_wcstombs 170 159 -11
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 36/-11) Total: 25 bytes
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'libbb/unicode.c')
-rw-r--r-- | libbb/unicode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/unicode.c b/libbb/unicode.c index c4b5f86ee..70c6abe00 100644 --- a/libbb/unicode.c +++ b/libbb/unicode.c | |||
@@ -131,7 +131,7 @@ size_t FAST_FUNC wcstombs(char *dest, const wchar_t *src, size_t n) | |||
131 | size_t len = wcrtomb_internal(tbuf, wc); | 131 | size_t len = wcrtomb_internal(tbuf, wc); |
132 | 132 | ||
133 | if (len > n) | 133 | if (len > n) |
134 | len = n; | 134 | break; |
135 | memcpy(dest, tbuf, len); | 135 | memcpy(dest, tbuf, len); |
136 | if (wc == L'\0') | 136 | if (wc == L'\0') |
137 | return org_n - n; | 137 | return org_n - n; |