diff options
| author | John Wiegley <johnw@newartisans.com> | 2011-02-01 05:57:45 -0500 |
|---|---|---|
| committer | John Wiegley <johnw@newartisans.com> | 2011-02-01 05:57:45 -0500 |
| commit | bf3389b930b8f040cd6a929bddd6fcd0c390f8f8 (patch) | |
| tree | 6eecc5e5250e32d1131f25c582376bf49956ce2d /src/object.c | |
| parent | 9217bbda49264e016e4c24950292cd2572ffed51 (diff) | |
| download | libgit2-bf3389b930b8f040cd6a929bddd6fcd0c390f8f8.tar.gz | |
Fixed bug where git__source_printf needs multiple attempts
Diffstat (limited to 'src/object.c')
| -rw-r--r-- | src/object.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/object.c b/src/object.c index 87e1b6eac..43698d276 100644 --- a/src/object.c +++ b/src/object.c @@ -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; |
