lib/hexapdf/content/parser.rb in hexapdf-0.20.4 vs lib/hexapdf/content/parser.rb in hexapdf-0.21.0
- old
+ new
@@ -92,14 +92,14 @@
elsif byte == 47 # /
parse_name
elsif byte == 40 # (
parse_literal_string
elsif byte == 60 # <
- if @string.getbyte(@ss.pos + 1) != 60
- parse_hex_string
- else
+ if @string.getbyte(@ss.pos + 1) == 60
@ss.pos += 2
TOKEN_DICT_START
+ else
+ parse_hex_string
end
elsif byte == 62 # >
unless @string.getbyte(@ss.pos + 1) == 62
raise HexaPDF::MalformedPDFError.new("Delimiter '>' found at invalid position", pos: pos)
end