diff --git a/jhove-modules/src/main/java/edu/harvard/hul/ois/jhove/module/pdf/Tokenizer.java b/jhove-modules/src/main/java/edu/harvard/hul/ois/jhove/module/pdf/Tokenizer.java index d8f744e6f..0e2b67595 100644 --- a/jhove-modules/src/main/java/edu/harvard/hul/ois/jhove/module/pdf/Tokenizer.java +++ b/jhove-modules/src/main/java/edu/harvard/hul/ois/jhove/module/pdf/Tokenizer.java @@ -418,9 +418,9 @@ else if (_state == (State.NAME)) { int ch1 = readChar (); int ch2 = readChar (); // Will throw a PDFException if not hexadecimal: - _ch = (hexValue(ch1) << 8) + hexValue(ch2); + _ch = (hexValue(ch1) << 4) + hexValue(ch2); } - if (isDelimiter (_ch) || isWhitespace (_ch)) { + else if (isDelimiter (_ch) || isWhitespace (_ch)) { _state = State.WHITESPACE; ((StringValuedToken) token).setValue(buffer.toString());