Allow up to 3 superfluous bits at end of stream

git-svn-id: https://zxing.googlecode.com/svn/trunk@659 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2008-10-31 18:49:54 +00:00
parent bf362ae853
commit 5a5987df88

View file

@ -63,7 +63,7 @@ final class DecodedBitStreamParser {
Mode mode;
do {
// While still another segment to read...
if (bits.available() == 0) {
if (bits.available() < 4) {
// OK, assume we're done. Really, a TERMINATOR mode should have been recorded here
mode = Mode.TERMINATOR;
} else {