Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ec6b864

Browse files
committed
Merge pull request libgit2#312 from nulltoken/patch-2
Fix MSVC compilation warning
2 parents 5fc5427 + 01dddd4 commit ec6b864

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/odb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ int git_odb_hashfile(git_oid *out, const char *path, git_otype type)
149149
return git__throw(GIT_EOSERR, "'%s' appears to be corrupted", path);
150150
}
151151

152-
hdr_len = format_object_header(hdr, sizeof(hdr), size, type);
152+
hdr_len = format_object_header(hdr, sizeof(hdr), (size_t)size, type);
153153
if (hdr_len < 0)
154154
return git__throw(GIT_ERROR, "Failed to format blob header. Length is out of bounds");
155155

0 commit comments

Comments
 (0)