projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3d2070
)
* StrBufReplaceToken(): source and dest of move operation was wrong
author
Wilfried Göesgens
<willi@citadel.org>
Tue, 16 Mar 2010 21:18:09 +0000
(21:18 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Tue, 16 Mar 2010 21:18:09 +0000
(21:18 +0000)
libcitadel/lib/stringbuf.c
patch
|
blob
|
history
diff --git
a/libcitadel/lib/stringbuf.c
b/libcitadel/lib/stringbuf.c
index 562376a27937cccca53e3f44cb240d0ec7d8f324..be4da4eb4e90c6b3cbf48fd70c098d3b2500be7a 100644
(file)
--- a/
libcitadel/lib/stringbuf.c
+++ b/
libcitadel/lib/stringbuf.c
@@
-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,