diff options
author | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2011-04-21 00:16:07 +0000 |
---|---|---|
committer | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2011-04-21 00:16:07 +0000 |
commit | e1c4c272498607eec76f32d3a9e0a080ecb2ea95 (patch) | |
tree | cd974d8dc9b84e965f71e6e11bf6420a32069b79 /lib/libc/citrus | |
parent | d2a0aead9c73d261c1eb30fe2d565b1052a6d2ed (diff) |
Don't use 'n' for the length of multibyte chars, because it is the length
of wide characters. This will fix a problem of uim-fep pre-edit display.
OK stsp@
Diffstat (limited to 'lib/libc/citrus')
-rw-r--r-- | lib/libc/citrus/citrus_utf8.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/citrus/citrus_utf8.c b/lib/libc/citrus/citrus_utf8.c index 45d07d74a57..895ca6a27fb 100644 --- a/lib/libc/citrus/citrus_utf8.c +++ b/lib/libc/citrus/citrus_utf8.c @@ -1,4 +1,4 @@ -/* $OpenBSD: citrus_utf8.c,v 1.3 2010/08/05 17:13:53 stsp Exp $ */ +/* $OpenBSD: citrus_utf8.c,v 1.4 2011/04/21 00:16:06 yasuoka Exp $ */ /*- * Copyright (c) 2002-2004 Tim J. Robbins @@ -253,7 +253,8 @@ _citrus_utf8_ctype_mbsrtowcs(wchar_t * __restrict pwcs, *pwcs = (wchar_t)*src; nb = 1; } else { - nb = _citrus_utf8_ctype_mbrtowc(pwcs, src, n, us); + nb = _citrus_utf8_ctype_mbrtowc(pwcs, src, + _CITRUS_UTF8_MB_CUR_MAX, us); if (nb == (size_t)-1) { *s = src; return (nb); |