projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a17db5
)
* shorten len if we shorten the buf
author
Wilfried Göesgens
<willi@citadel.org>
Tue, 16 Jun 2009 20:08:07 +0000
(20:08 +0000)
committer
Wilfried Göesgens
<willi@citadel.org>
Tue, 16 Jun 2009 20:08:07 +0000
(20:08 +0000)
libcitadel/lib/stringbuf.c
patch
|
blob
|
history
diff --git
a/libcitadel/lib/stringbuf.c
b/libcitadel/lib/stringbuf.c
index dcf6b9121304f1670042a3e7d59057f7fb02279e..1af664ef1af1b4f7040d1449a175b8b01d286f81 100644
(file)
--- a/
libcitadel/lib/stringbuf.c
+++ b/
libcitadel/lib/stringbuf.c
@@
-2632,10
+2632,11
@@
void StrBuf_RFC822_to_Utf8(StrBuf *Target, const StrBuf *DecodeMe, const StrBuf*
/* did we find a gab just filled with blanks? */
if (ptr == next)
{
+ long gap = next - start;
memmove (end + 2,
next,
- len - (
next - start
));
-
+ len - (
gap
));
+ len -= gap;
/* now terminate the gab at the end */
delta = (next - end) - 2; ////TODO: const!
((StrBuf*)DecodeMe)->BufUsed -= delta;