From: Wilfried Göesgens Date: Sun, 8 Feb 2009 09:29:05 +0000 (+0000) Subject: * fixup StrBufRemove_token X-Git-Tag: v7.86~1481 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=f9e19e2caffaf873e3498c8856b478d578f97316 * fixup StrBufRemove_token --- diff --git a/libcitadel/lib/stringbuf.c b/libcitadel/lib/stringbuf.c index ba1c12c17..f669ecf36 100644 --- 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) {