From e1c4c272498607eec76f32d3a9e0a080ecb2ea95 Mon Sep 17 00:00:00 2001 From: YASUOKA Masahiko Date: Thu, 21 Apr 2011 00:16:07 +0000 Subject: 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@ --- lib/libc/citrus/citrus_utf8.c | 5 +++-- 1 file 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); -- cgit v1.2.3