diff options
Diffstat (limited to 'src/tool_writeout.c')
-rw-r--r-- | src/tool_writeout.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tool_writeout.c b/src/tool_writeout.c index e1b7819ed..2fb77742a 100644 --- a/src/tool_writeout.c +++ b/src/tool_writeout.c @@ -124,9 +124,14 @@ void ourWriteOut(CURL *curl, struct OutStruct *outs, const char *writeinfo) char *end; char keepit; int i; - if(('{' == ptr[1]) && ((end = strchr(ptr, '}')) != NULL)) { + if('{' == ptr[1]) { bool match = FALSE; + end = strchr(ptr, '}'); ptr += 2; /* pass the % and the { */ + if(!end) { + fputs("%{", stream); + continue; + } keepit = *end; *end = 0; /* zero terminate */ for(i = 0; replacements[i].name; i++) { |