use strbuf_addbuf() for appending a strbuf to another
[gitweb.git] / dir.c
diff --git a/dir.c b/dir.c
index 88e89585eb1634e07a9316ccd6caf8ea3643e817..05b98843ee3eb5ef5cf5f99b3ab5b4a866c274e4 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -2346,7 +2346,7 @@ void write_untracked_extension(struct strbuf *out, struct untracked_cache *untra
 
        varint_len = encode_varint(untracked->ident.len, varbuf);
        strbuf_add(out, varbuf, varint_len);
-       strbuf_add(out, untracked->ident.buf, untracked->ident.len);
+       strbuf_addbuf(out, &untracked->ident);
 
        strbuf_add(out, ouc, ouc_size(len));
        free(ouc);