strbuf: make sure buffer is zero-terminated
authorErik Faye-Lund <redacted>
Sun, 10 Apr 2011 20:54:17 +0000 (22:54 +0200)
committerJunio C Hamano <redacted>
Mon, 11 Apr 2011 21:10:05 +0000 (14:10 -0700)
commit5e7a5d97f8a74181634a70e0e7b1464855c5af2d
tree8d0b9376618d91fd6940ac801bc22fb2c7e29a59
parente923eaeb901ff056421b9007adcbbce271caa7b6
strbuf: make sure buffer is zero-terminated

strbuf_init does not zero-terminate the initial buffer when hint is
non-zero. Fix this so we can rely on the string to be zero-terminated
even if we haven't filled it with anything yet.

Signed-off-by: Erik Faye-Lund <redacted>
Acked-by: Jeff King <redacted>
Signed-off-by: Junio C Hamano <redacted>
strbuf.c
git clone https://git.99rst.org/PROJECT