summaryrefslogtreecommitdiff
path: root/libbb/unicode.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/unicode.c')
-rw-r--r--libbb/unicode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/unicode.c b/libbb/unicode.c
index c4b5f86..70c6abe 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)
size_t len = wcrtomb_internal(tbuf, wc);
if (len > n)
- len = n;
+ break;
memcpy(dest, tbuf, len);
if (wc == L'\0')
return org_n - n;