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

Skip to content

Commit d37ba67

Browse files
committed
Merge pull request #312 from nulltoken/patch-2
Fix MSVC compilation warning
2 parents c52736f + b21fb84 commit d37ba67

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)