summaryrefslogtreecommitdiff
path: root/xdelta3
diff options
context:
space:
mode:
authorjosh.macdonald <jmacd@users.noreply.github.com>2008-04-20 22:41:24 +0000
committerjosh.macdonald <jmacd@users.noreply.github.com>2008-04-20 22:41:24 +0000
commit45601a0e4de335cda615b9a653c5db2b97b37d57 (patch)
tree7b29246fe0b3be7f9d4124e37eee532830736a72 /xdelta3
parentfbcf9d630679b1078221b5afc6da9074bad50492 (diff)
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.
Diffstat (limited to 'xdelta3')
-rw-r--r--xdelta3/xdelta3-merge.h6
1 files 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,
405 405
406 sinst = &source->inst[sinst_num]; 406 sinst = &source->inst[sinst_num];
407 407
408 XD3_ASSERT (sinst->position >= iinst.addr); 408 XD3_ASSERT (iinst.addr >= sinst->position);
409 409
410 sinst_offset = sinst->position - iinst.addr; 410 sinst_offset = iinst.addr - sinst->position;
411 411
412 XD3_ASSERT (sinst->size > (sinst->position - iinst.addr)); 412 XD3_ASSERT (sinst->size > sinst_offset);
413 413
414 sinst_left = sinst->size - sinst_offset; 414 sinst_left = sinst->size - sinst_offset;
415 this_take = min (iinst.size, sinst_left); 415 this_take = min (iinst.size, sinst_left);