X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=pack-objects.c;h=614e87bc8cb92998226362f98ff2a87a8e6bbdc8;hb=be0c7e069738fbb697b0719f2252107261c9340e;hp=c0acc460bb9df0313e314eb2cf48363b2458082c;hpb=0dec30b9788b12fdae5d5b69fc366a28bb688d80;p=git.git diff --git a/pack-objects.c b/pack-objects.c index c0acc460..614e87bc 100644 --- a/pack-objects.c +++ b/pack-objects.c @@ -156,7 +156,7 @@ static void prepare_pack_revindex(struct pack_revindex *rix) rix->revindex = xmalloc(sizeof(unsigned long) * (num_ent + 1)); for (i = 0; i < num_ent; i++) { - long hl = *((long *)(index + 24 * i)); + unsigned int hl = *((unsigned int *)(index + 24 * i)); rix->revindex[i] = ntohl(hl); } /* This knows the pack format -- the 20-byte trailer