fix invalid memory write

This commit is contained in:
Andrew Kelley
2015-11-25 15:17:19 -07:00
parent 0b59afec56
commit a600df073a
4 changed files with 21 additions and 3 deletions

View File

@@ -25,6 +25,7 @@ Buf *buf_sprintf(const char *format, ...) {
}
void buf_appendf(Buf *buf, const char *format, ...) {
assert(buf->list.length);
va_list ap, ap2;
va_start(ap, format);
va_copy(ap2, ap);