diff --git a/printbuf.c b/printbuf.c index fe952b4..a40b89d 100644 --- a/printbuf.c +++ b/printbuf.c @@ -42,6 +42,7 @@ struct printbuf* printbuf_new(void) free(p); return NULL; } + p->buf[0]= '\0'; return p; }