mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 15:10:02 +00:00
Fixed bug where git__source_printf needs multiple attempts
This commit is contained in:
parent
9217bbda49
commit
bf3389b930
@ -109,12 +109,9 @@ int git__source_printf(git_odb_source *source, const char *format, ...)
|
|||||||
if (source_resize(source) < GIT_SUCCESS)
|
if (source_resize(source) < GIT_SUCCESS)
|
||||||
return GIT_ENOMEM;
|
return GIT_ENOMEM;
|
||||||
|
|
||||||
did_resize = 1;
|
len = vsnprintf(source->write_ptr, source->raw.len - source->written_bytes, format, arglist);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (did_resize)
|
|
||||||
vsnprintf(source->write_ptr, source->raw.len - source->written_bytes, format, arglist);
|
|
||||||
|
|
||||||
source->write_ptr = (char *)source->write_ptr + len;
|
source->write_ptr = (char *)source->write_ptr + len;
|
||||||
source->written_bytes += len;
|
source->written_bytes += len;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user