Commit bf3389b9 by John Wiegley

Fixed bug where git__source_printf needs multiple attempts

parent 9217bbda
......@@ -109,12 +109,9 @@ int git__source_printf(git_odb_source *source, const char *format, ...)
if (source_resize(source) < GIT_SUCCESS)
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->written_bytes += len;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment