From 296f1d3fd618ae66e50d83b8b7c9d9f35b979e5b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Tue, 10 Nov 2009 22:44:10 +0000 Subject: [PATCH] * same bug at StrBuf_Utf8StrLen too. --- libcitadel/lib/stringbuf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libcitadel/lib/stringbuf.c b/libcitadel/lib/stringbuf.c index 6a08934ae..88c984ae5 100644 --- a/libcitadel/lib/stringbuf.c +++ b/libcitadel/lib/stringbuf.c @@ -3384,14 +3384,13 @@ long StrBuf_Utf8StrLen(StrBuf *Buf) while ((aptr < eptr) && (*aptr != '\0')) { if (Ctdl_IsUtf8SequenceStart(*aptr)){ m = Ctdl_GetUtf8SequenceLength(aptr, eptr); - while ((aptr < eptr) && (m-- > 0) && (*aptr++ != '\0')) - n ++; + while ((aptr < eptr) && (*aptr++ != '\0')&& (m-- > 0) ); + n ++; } else { n++; aptr++; } - } return n; } -- 2.39.2