Commit 778dbd1d authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

VSB_quote() is getting too complex, I'll need to revisit that...

parent 21c215fa
......@@ -544,7 +544,8 @@ VSB_quote_pfx(struct vsb *s, const char *pfx, const void *v, int len, int how)
}
if (!quote && !(how & (VSB_QUOTE_JSON|VSB_QUOTE_CSTR))) {
(void)VSB_bcat(s, p, len);
if ((how & VSB_QUOTE_NONL) && p[len-1] != '\n')
if ((how & (VSB_QUOTE_UNSAFE|VSB_QUOTE_NONL))
&& p[len-1] != '\n')
(void)VSB_putc(s, '\n');
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment