Browse files

Bug fix for concurrent input test.

If the randomly-chosen buffer size is 1, then we end up asking for a random number between 0 (inclusive) and 0 (exclusive), which fails. Don't let the buffer size be 1.
  • Loading branch information...
1 parent c0f271c commit 3b5371236eea2e2b1b992299695753de68d3cd35 @league committed Aug 26, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 net/contrapunctus/lzma/ConcurrentBufferInputTest.java
View
2 net/contrapunctus/lzma/ConcurrentBufferInputTest.java
@@ -156,7 +156,7 @@ protected void checkedRun() throws InterruptedException
boolean read() throws IOException
{
- byte[] bs = new byte[rng.nextInt(MAX_BUFFER)+1];
+ byte[] bs = new byte[rng.nextInt(MAX_BUFFER)+2];
int n;
switch(rng.nextInt(4))
{

0 comments on commit 3b53712

Please sign in to comment.