From 45601a0e4de335cda615b9a653c5db2b97b37d57 Mon Sep 17 00:00:00 2001 From: "josh.macdonald" Date: Sun, 20 Apr 2008 22:41:24 +0000 Subject: No, doesn't work but this is a little closer. The bug-fix for the infinite loop in issue 70 is breaking identical-input detection too. --- xdelta3/xdelta3-merge.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xdelta3/xdelta3-merge.h b/xdelta3/xdelta3-merge.h index d917ba5..abc7c54 100644 --- a/xdelta3/xdelta3-merge.h +++ b/xdelta3/xdelta3-merge.h @@ -405,11 +405,11 @@ xd3_merge_source_copy (xd3_stream *stream, sinst = &source->inst[sinst_num]; - XD3_ASSERT (sinst->position >= iinst.addr); + XD3_ASSERT (iinst.addr >= sinst->position); - sinst_offset = sinst->position - iinst.addr; + sinst_offset = iinst.addr - sinst->position; - XD3_ASSERT (sinst->size > (sinst->position - iinst.addr)); + XD3_ASSERT (sinst->size > sinst_offset); sinst_left = sinst->size - sinst_offset; this_take = min (iinst.size, sinst_left); -- cgit v1.2.3