lib/hexapdf/parser.rb in hexapdf-0.47.0 vs lib/hexapdf/parser.rb in hexapdf-1.0.0

- old
+ new

@@ -182,10 +182,10 @@ # Note that getting :Length might move the IO pointer (when resolving references) pos = @tokenizer.pos length = if object[:Length].kind_of?(Integer) object[:Length] elsif object[:Length].kind_of?(Reference) - @document.deref(object[:Length]).value + @document.deref(object[:Length])&.value || 0 else 0 end @tokenizer.pos = pos + length rescue pos