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