From: Wilfried Goesgens Date: Thu, 10 Oct 2013 21:16:24 +0000 (+0200) Subject: we mustn't cut the string if we don't find a boundary. X-Git-Tag: v9.01~217 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=d86d9c0e37d1d10eda0e6c9238c7386876fd3359 we mustn't cut the string if we don't find a boundary. --- diff --git a/libcitadel/lib/stringbuf.c b/libcitadel/lib/stringbuf.c index cdb4ccd0a..eb751c8d7 100644 --- a/libcitadel/lib/stringbuf.c +++ b/libcitadel/lib/stringbuf.c @@ -1184,19 +1184,11 @@ void StrBufStripAllBut(StrBuf *Buf, char leftboundary, char rightboundary) if (pRight != NULL) { StrBufCutAt(Buf, 0, pRight); } - else { - StrBufCutAt(Buf, 0, Buf->buf); - return; - } pLeft = strrchr(ChrPtr(Buf), leftboundary); if (pLeft != NULL) { StrBufCutLeft(Buf, pLeft - Buf->buf + 1); } - else { - StrBufCutAt(Buf, 0, Buf->buf); - return; - } }