binary file search fix

This commit is contained in:
Honfika
2014-01-22 00:17:03 +01:00
parent 043b4c12da
commit e2a42471de
3 changed files with 17 additions and 19 deletions

View File

@@ -51,7 +51,7 @@ public class MemoryInputStream extends SeekableInputStream {
}
this.maxLength = maxLength;
if (startPos + maxLength >= buffer.length) {
throw new IOException("Invalid maxLength");
this.maxLength = buffer.length - startPos - 1;
}
}