* StrBufReplaceToken(): source and dest of move operation was wrong
authorWilfried Göesgens <willi@citadel.org>
Tue, 16 Mar 2010 21:18:09 +0000 (21:18 +0000)
committerWilfried Göesgens <willi@citadel.org>
Tue, 16 Mar 2010 21:18:09 +0000 (21:18 +0000)
libcitadel/lib/stringbuf.c

index 562376a27937cccca53e3f44cb240d0ec7d8f324..be4da4eb4e90c6b3cbf48fd70c098d3b2500be7a 100644 (file)
@@ -1070,8 +1070,8 @@ int StrBufReplaceToken(StrBuf *Buf, long where, long HowLong,
                if (IncreaseBuf(Buf, 1, Buf->BufUsed + ReplLen) < 0)
                        return -1;
 
-       memmove(Buf->buf + where + HowLong
-               Buf->buf + where + ReplLen,
+       memmove(Buf->buf + where + ReplLen
+               Buf->buf + where + HowLong,
                Buf->BufUsed - where - HowLong);
                                                
        memcpy(Buf->buf + where,