summaryrefslogtreecommitdiff
path: root/src/odb_pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/odb_pack.c')
-rw-r--r--src/odb_pack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/odb_pack.c b/src/odb_pack.c
index b91e3cadb..242200b4a 100644
--- a/src/odb_pack.c
+++ b/src/odb_pack.c
@@ -219,7 +219,7 @@ static int packfile_load__cb(void *_data, git_buf *path)
for (i = 0; i < backend->packs.length; ++i) {
struct git_pack_file *p = git_vector_get(&backend->packs, i);
- if (memcmp(p->pack_name, path->ptr, path->size - strlen(".idx")) == 0)
+ if (memcmp(p->pack_name, git_buf_cstr(path), git_buf_len(path) - strlen(".idx")) == 0)
return 0;
}