Skip to content

Commit db6b8f7

Browse files
committed
strtol: cast error message length to int
1 parent d103f00 commit db6b8f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ int git__strntol32(int32_t *result, const char *nptr, size_t nptr_len, const cha
192192

193193
tmp_int = tmp_long & 0xFFFFFFFF;
194194
if (tmp_int != tmp_long) {
195-
int len = tmp_endptr - nptr;
195+
int len = (int)(tmp_endptr - nptr);
196196
git_error_set(GIT_ERROR_INVALID, "failed to convert: '%.*s' is too large", len, nptr);
197197
return -1;
198198
}

0 commit comments

Comments
 (0)