diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2021-12-23 14:04:43 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-23 14:04:43 -0500 |
commit | 4b27009cadb1bf09ad272f72745310a881762d78 (patch) | |
tree | fe7c2f2ba0feba0d31145e010f32bdd428b7497e /src/commit_graph.c | |
parent | 734468d6fd92fc5d8a6d15b3573e4a384c391c22 (diff) | |
parent | 5761980d11c739be3b360b5fb0d45552d8495291 (diff) | |
download | libgit2-4b27009cadb1bf09ad272f72745310a881762d78.tar.gz |
Merge pull request #6094 from visualgitio/commit-graph-long-long
Fix a long long that crept past
Diffstat (limited to 'src/commit_graph.c')
-rw-r--r-- | src/commit_graph.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commit_graph.c b/src/commit_graph.c index 924a3992b..292250f65 100644 --- a/src/commit_graph.c +++ b/src/commit_graph.c @@ -1075,11 +1075,11 @@ static int commit_graph_write( commit_time = (uint64_t)packed_commit->commit_time; if (generation > GIT_COMMIT_GRAPH_GENERATION_NUMBER_MAX) generation = GIT_COMMIT_GRAPH_GENERATION_NUMBER_MAX; - word = ntohl((uint32_t)((generation << 2) | ((commit_time >> 32ull) & 0x3ull))); + word = ntohl((uint32_t)((generation << 2) | (((uint32_t)(commit_time >> 32)) & 0x3) )); error = git_str_put(&commit_data, (const char *)&word, sizeof(word)); if (error < 0) goto cleanup; - word = ntohl((uint32_t)(commit_time & 0xffffffffull)); + word = ntohl((uint32_t)(commit_time & 0xfffffffful)); error = git_str_put(&commit_data, (const char *)&word, sizeof(word)); if (error < 0) goto cleanup; |