mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
This commit is contained in:
parent
6bcae2e5ea
commit
5b0036446e
|
@ -183,6 +183,9 @@ public final class Decoder {
|
||||||
eci = eci * 10 + (nextDigit - 2);
|
eci = eci * 10 + (nextDigit - 2);
|
||||||
}
|
}
|
||||||
CharacterSetECI charsetECI = CharacterSetECI.getCharacterSetECIByValue(eci);
|
CharacterSetECI charsetECI = CharacterSetECI.getCharacterSetECIByValue(eci);
|
||||||
|
if (charsetECI == null) {
|
||||||
|
throw FormatException.getFormatInstance();
|
||||||
|
}
|
||||||
encoding = charsetECI.getCharset();
|
encoding = charsetECI.getCharset();
|
||||||
}
|
}
|
||||||
// Go back to whatever mode we had been in
|
// Go back to whatever mode we had been in
|
||||||
|
|
|
@ -126,6 +126,9 @@ final class DecodedBitStreamParser {
|
||||||
case ECI_CHARSET:
|
case ECI_CHARSET:
|
||||||
CharacterSetECI charsetECI =
|
CharacterSetECI charsetECI =
|
||||||
CharacterSetECI.getCharacterSetECIByValue(codewords[codeIndex++]);
|
CharacterSetECI.getCharacterSetECIByValue(codewords[codeIndex++]);
|
||||||
|
if (charsetECI == null) {
|
||||||
|
throw FormatException.getFormatInstance();
|
||||||
|
}
|
||||||
encoding = charsetECI.getCharset();
|
encoding = charsetECI.getCharset();
|
||||||
break;
|
break;
|
||||||
case ECI_GENERAL_PURPOSE:
|
case ECI_GENERAL_PURPOSE:
|
||||||
|
|
Loading…
Reference in a new issue