Permalink
Browse files

Bugfix wrt. datasize choice in ChunkedMethod.

  • Loading branch information...
1 parent 21baf66 commit a81c8f30be4121f4e3c6234154b1b8c862b44346 @esstrifork esstrifork committed Jun 23, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/java/com/trifork/deltazip/ChunkedMethod.java
@@ -309,7 +309,7 @@ public static int spec_to_rskip(int rskip_spec) {
public static int spec_to_dsize(int dsize_spec, int total_dsize) {
if (dsize_spec == -1) return total_dsize;
- else return (2+dsize_spec) * (CHUNK_SIZE / 2);
+ else return Math.min((2+dsize_spec) * (CHUNK_SIZE / 2), total_dsize);
}
}// class ChunkedMethod

0 comments on commit a81c8f3

Please sign in to comment.