mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-06 23:26:39 +00:00
sha1_lookup: Hello my name is MSVC and how do I pointer
This commit is contained in:
parent
67591c8cd8
commit
e2164da5eb
@ -183,9 +183,11 @@ int sha1_position(const void *table,
|
|||||||
unsigned lo, unsigned hi,
|
unsigned lo, unsigned hi,
|
||||||
const unsigned char *key)
|
const unsigned char *key)
|
||||||
{
|
{
|
||||||
|
const unsigned char *base = table;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
unsigned mi = (lo + hi) / 2;
|
unsigned mi = (lo + hi) / 2;
|
||||||
int cmp = git_oid__cmp(table + mi * stride, (git_oid *)key);
|
int cmp = git_oid__cmp((git_oid *)(base + mi * stride), (git_oid *)key);
|
||||||
|
|
||||||
if (!cmp)
|
if (!cmp)
|
||||||
return mi;
|
return mi;
|
||||||
|
Loading…
Reference in New Issue
Block a user