diff options
Diffstat (limited to 'strbuf.c')
-rw-r--r-- | strbuf.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -52,8 +52,8 @@ char strbuf_slopbuf[1]; void strbuf_init(struct strbuf *sb, size_t hint) { - sb->alloc = sb->len = 0; - sb->buf = strbuf_slopbuf; + struct strbuf blank = STRBUF_INIT; + memcpy(sb, &blank, sizeof(*sb)); if (hint) strbuf_grow(sb, hint); } |