mirror of
https://git.proxmox.com/git/libgit2
synced 2025-12-25 17:34:20 +00:00
Fix gen_pktline format specifier for Win32
This commit is contained in:
parent
fad251ae02
commit
47fc264203
@ -38,8 +38,10 @@
|
||||
/* Define the printf format specifer to use for size_t output */
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
# define PRIuZ "Iu"
|
||||
# define PRIxZ "Ix"
|
||||
#else
|
||||
# define PRIuZ "zu"
|
||||
# define PRIxZ "zx"
|
||||
#endif
|
||||
|
||||
/* Micosoft Visual C/C++ */
|
||||
|
||||
@ -541,7 +541,7 @@ static int gen_pktline(git_buf *buf, git_push *push)
|
||||
git_oid_fmt(old_id, &spec->roid);
|
||||
git_oid_fmt(new_id, &spec->loid);
|
||||
|
||||
git_buf_printf(buf, "%04zx%s %s %s", len, old_id, new_id, spec->rref);
|
||||
git_buf_printf(buf, "%04"PRIxZ"%s %s %s", len, old_id, new_id, spec->rref);
|
||||
|
||||
if (i == 0) {
|
||||
git_buf_putc(buf, '\0');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user