X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=csum-file.c;h=3ab65b7515d5a4cb9c8d9b6c4f8eb32121d3c628;hb=5db47c2bb3b7e77fd32aeef12b6f6de8d14cb43b;hp=9f9553ae035e762d12dc7d885432abd920af6e5b;hpb=e18088451d92fbf83bfb57fd48201eda117f8103;p=git.git diff --git a/csum-file.c b/csum-file.c index 9f9553ae0..3ab65b751 100644 --- a/csum-file.c +++ b/csum-file.c @@ -58,6 +58,7 @@ int sha1write(struct sha1file *f, void *buf, unsigned int count) memcpy(f->buffer + offset, buf, nr); count -= nr; offset += nr; + buf += nr; left -= nr; if (!left) { SHA1_Update(&f->ctx, f->buffer, offset);