X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=sha1_file.c;h=631a605201e3a737e8e3db25f85f01a228b01282;hb=3a3e89b897e122f1f154293e55b1d6c863ffbd2c;hp=b62d0e3dcd0c0142a025d202eec2f233932aed68;hpb=f7a3276bab880222e3117f8b8cbef40920dfe884;p=git.git diff --git a/sha1_file.c b/sha1_file.c index b62d0e3d..631a6052 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -1161,7 +1161,7 @@ int find_pack_entry_one(const unsigned char *sha1, int mi = (lo + hi) / 2; int cmp = memcmp(index + 24 * mi + 4, sha1, 20); if (!cmp) { - e->offset = ntohl(*((int*)(index + 24 * mi))); + e->offset = ntohl(*((uint32_t *)(index + 24 * mi))); memcpy(e->sha1, sha1, 20); e->p = p; return 1;