Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ceed221 commit d68af29Copy full SHA for d68af29
src/odb.c
@@ -1361,10 +1361,8 @@ int git_odb__error_notfound(
1361
const char *message, const git_oid *oid, size_t oid_len)
1362
{
1363
if (oid != NULL) {
1364
- size_t buf_len = oid_len;
1365
char oid_str[GIT_OID_HEXSZ + 1];
1366
- if (oid_len == GIT_OID_HEXSZ) buf_len++;
1367
- git_oid_tostr(oid_str, buf_len, oid);
+ git_oid_tostr(oid_str, oid_len+1, oid);
1368
giterr_set(GITERR_ODB, "Object not found - %s (%.*s)",
1369
message, oid_len, oid_str);
1370
} else
0 commit comments