mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Used-supplied workaround for encoders which append spurious latch to ASCII at end of bit stream
git-svn-id: https://zxing.googlecode.com/svn/trunk@1759 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
a48dbeab11
commit
379ee79702
|
@ -168,7 +168,12 @@ final class DecodedBitStreamParser {
|
|||
//throw ReaderException.getInstance();
|
||||
// Ignore this symbol for now
|
||||
} else if (oneByte >= 242) { // Not to be used in ASCII encodation
|
||||
throw FormatException.getFormatInstance();
|
||||
// ... but work around encoders that end with 254, latch back to ASCII
|
||||
if (oneByte == 254 && bits.available() == 0) {
|
||||
// Ignore
|
||||
} else {
|
||||
throw FormatException.getFormatInstance();
|
||||
}
|
||||
}
|
||||
} while (bits.available() > 0);
|
||||
return ASCII_ENCODE;
|
||||
|
|
Loading…
Reference in a new issue