projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
442ab8b
)
* fixup StrBufRemove_token
author
Wilfried Göesgens
<willi@citadel.org>
Sun, 8 Feb 2009 09:29:05 +0000
(09:29 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Sun, 8 Feb 2009 09:29:05 +0000
(09:29 +0000)
libcitadel/lib/stringbuf.c
patch
|
blob
|
history
diff --git
a/libcitadel/lib/stringbuf.c
b/libcitadel/lib/stringbuf.c
index ba1c12c173b222e8cefbbbcbf8bc1e0676ebfd0c..f669ecf362ae895a76d078358a58e8fb9fda6ad6 100644
(file)
--- a/
libcitadel/lib/stringbuf.c
+++ b/
libcitadel/lib/stringbuf.c
@@
-849,12
+849,13
@@
int StrBufRemove_token(StrBuf *Source, int parmnum, char separator)
while (*s && *s != separator) {
s++;
}
-
+ if (*s == separator)
+ s++;
ReducedBy = d - s;
/* Hack and slash */
if (*s) {
- memmove(d, s, Source->BufUsed - (s - Source->buf));
+ memmove(d, s, Source->BufUsed - (s - Source->buf)
+ 1
);
Source->BufUsed -= (ReducedBy + 1);
}
else if (d == Source->buf) {