diff --git a/core/src/com/google/zxing/datamatrix/decoder/DecodedBitStreamParser.java b/core/src/com/google/zxing/datamatrix/decoder/DecodedBitStreamParser.java index b390fb908..859848b88 100644 --- a/core/src/com/google/zxing/datamatrix/decoder/DecodedBitStreamParser.java +++ b/core/src/com/google/zxing/datamatrix/decoder/DecodedBitStreamParser.java @@ -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;