projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6367af3
)
Fix off by one when cutting utf8-strings
author
Wilfried Goesgens
<willi@arangodb.com>
Thu, 19 Nov 2015 21:29:53 +0000
(22:29 +0100)
committer
Wilfried Goesgens
<willi@arangodb.com>
Thu, 19 Nov 2015 21:29:53 +0000
(22:29 +0100)
libcitadel/lib/stringbuf.c
patch
|
blob
|
history
diff --git
a/libcitadel/lib/stringbuf.c
b/libcitadel/lib/stringbuf.c
index cf786ab5f10956a3dc94de6265f120fcaf41eac1..12fd259e4582ef93d9da48158582d4a0ca0bca40 100644
(file)
--- a/
libcitadel/lib/stringbuf.c
+++ b/
libcitadel/lib/stringbuf.c
@@
-4142,11
+4142,11
@@
long StrBuf_Utf8StrCut(StrBuf *Buf, int maxlen)
n++;
aptr++;
}
- if (n > maxlen) {
+ if (n >
=
maxlen) {
*aptr = '\0';
Buf->BufUsed = aptr - Buf->buf;
return Buf->BufUsed;
- }
+ }
}
return Buf->BufUsed;