projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3de7cf7
)
StrBuf_NextToken: if the source is empty, flush the target.
author
Wilfried Goesgens
<dothebart@citadel.org>
Sun, 26 Dec 2010 12:22:55 +0000
(13:22 +0100)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Sun, 26 Dec 2010 12:22:55 +0000
(13:22 +0100)
libcitadel/lib/stringbuf.c
patch
|
blob
|
history
diff --git
a/libcitadel/lib/stringbuf.c
b/libcitadel/lib/stringbuf.c
index 6d8f549d371d2e00aac73d2e945f004d6564d635..dfba39d7e13e904ffc202186139a53a90bdfc40f 100644
(file)
--- a/
libcitadel/lib/stringbuf.c
+++ b/
libcitadel/lib/stringbuf.c
@@
-1502,6
+1502,8
@@
int StrBufExtract_NextToken(StrBuf *dest, const StrBuf *Source, const char **pSt
(Source->BufUsed == 0) )
{
*pStart = StrBufNOTNULL;
+ if (dest != NULL)
+ FlushStrBuf(dest);
return -1;
}