diff options
Diffstat (limited to 'src/pack.c')
-rw-r--r-- | src/pack.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pack.c b/src/pack.c index e19fc4bf3..f36f3cf6b 100644 --- a/src/pack.c +++ b/src/pack.c @@ -760,12 +760,11 @@ git_off_t get_delta_base( } else if (type == GIT_OBJ_REF_DELTA) { /* If we have the cooperative cache, search in it first */ if (p->has_cache) { - int pos; + size_t pos; struct git_pack_entry key; git_oid_fromraw(&key.sha1, base_info); - pos = git_vector_bsearch(&p->cache, &key); - if (pos >= 0) { + if (!git_vector_bsearch(&pos, &p->cache, &key)) { *curpos += 20; return ((struct git_pack_entry *)git_vector_get(&p->cache, pos))->offset; } |