projects
/
citadel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
StrBuf_NextToken: if the source is empty, flush the target.
[citadel.git]
/
libcitadel
/
lib
/
stringbuf.c
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;
}