Issue #118 (supplemental) Fix logic error on a null encoding

This commit is contained in:
Sean Owen 2014-04-22 21:24:20 +01:00
parent 002aa47e01
commit 2894c094f5

View file

@ -166,7 +166,7 @@ final class PDF417HighLevelEncoder {
//the codewords 0..928 are encoded as Unicode characters
StringBuilder sb = new StringBuilder(msg.length());
if (encoding != null || !DEFAULT_ENCODING_NAMES.contains(encoding.name())) {
if (encoding != null && !DEFAULT_ENCODING_NAMES.contains(encoding.name())) {
CharacterSetECI eci = CharacterSetECI.getCharacterSetECIByName(encoding.name());
if (eci != null) {
encodingECI(eci.getValue(), sb);