diff options
author | josh.macdonald <jmacd@users.noreply.github.com> | 2007-12-05 03:53:30 +0000 |
---|---|---|
committer | josh.macdonald <jmacd@users.noreply.github.com> | 2007-12-05 03:53:30 +0000 |
commit | 8ee35e6f26f054730333c824158464042518ff52 (patch) | |
tree | e7871a685cd2b61ae9b49630ac2d7467fb52ce55 | |
parent | d13bec62c6ab184903118bf803219b27229c214e (diff) |
Fix bug in xd3_set_source, the optimization for shiftby/maskby were
in some cases not setting those variables, which are used by xd3_blksize_div
-rw-r--r-- | xdelta3/xdelta3.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/xdelta3/xdelta3.c b/xdelta3/xdelta3.c index 48c0013..0f8cf8d 100644 --- a/xdelta3/xdelta3.c +++ b/xdelta3/xdelta3.c | |||
@@ -2561,6 +2561,11 @@ xd3_set_source (xd3_stream *stream, | |||
2561 | src->shiftby = shiftby; | 2561 | src->shiftby = shiftby; |
2562 | src->maskby = (1 << shiftby) - 1; | 2562 | src->maskby = (1 << shiftby) - 1; |
2563 | } | 2563 | } |
2564 | else | ||
2565 | { | ||
2566 | src->shiftby = 0; | ||
2567 | src->maskby = 0; | ||
2568 | } | ||
2564 | 2569 | ||
2565 | xd3_blksize_div (src->size, src, &blk_num, &tail_size); | 2570 | xd3_blksize_div (src->size, src, &blk_num, &tail_size); |
2566 | src->blocks = blk_num + (tail_size > 0); | 2571 | src->blocks = blk_num + (tail_size > 0); |