projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b1a7a49
)
* same bug at StrBuf_Utf8StrLen too.
author
Wilfried Göesgens
<willi@citadel.org>
Tue, 10 Nov 2009 22:44:10 +0000
(22:44 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Tue, 10 Nov 2009 22:44:10 +0000
(22:44 +0000)
libcitadel/lib/stringbuf.c
patch
|
blob
|
history
diff --git
a/libcitadel/lib/stringbuf.c
b/libcitadel/lib/stringbuf.c
index 6a08934aec2daf3f53d2fb055b128ed3c49c2f37..88c984ae5961e07f71e504856169d1c68a817108 100644
(file)
--- 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;
}