commit - a85917112992dbff7d0827f6cf65c6b5a3fb7bd2
commit + aa51f4a4acac901a4f1bf4062664644ce95d3e8c
blob - e27b25b4e258ce633b60e16862f79901efaf78d5
blob + 330dc413ad648dbbb4e71369fa0a76eecd197523
--- lib/deltify.c
+++ lib/deltify.c
{
uint8_t basebuf[GOT_DELTIFY_MAXCHUNK], buf[GOT_DELTIFY_MAXCHUNK];
size_t base_r, r, i;
- off_t orig_blocklen = *blocklen;
- off_t pos = ftello(f);
int buf_equal = 1;
if (fseeko(basefile, block->offset, SEEK_SET) == -1)
(*blocklen)++;
}
}
-
- if (fseeko(f, pos + *blocklen - orig_blocklen, SEEK_SET) == -1)
- return got_error_from_errno("fseeko");
return NULL;
}
blocklen);
}
fileoffset += blocklen;
+ if (fseeko(f, fileoffset, SEEK_SET) == -1)
+ return got_error_from_errno("fseeko");
+
}
if (err) {