lib/combine_pdf/parser.rb in combine_pdf-1.0.21 vs lib/combine_pdf/parser.rb in combine_pdf-1.0.22

- old
+ new

@@ -358,11 +358,11 @@ ########################################## elsif @scanner.scan(/stream[ \t]*[\r\n]/) @scanner.pos += 1 if @scanner.peek(1) == "\n".freeze && @scanner.matched[-1] != "\n".freeze # advance by the publshed stream length (if any) old_pos = @scanner.pos - if(out.last.is_a?(Hash) && out.last[:Length].is_a?(Integer) && out.last[:Length].to_i > 2) - @scanner.pos += out.last[:Length].to_i - 2 + if(out.last.is_a?(Hash) && out.last[:Length].is_a?(Integer) && out.last[:Length] > 2) + @scanner.pos += out.last[:Length] - 2 end # the following was dicarded because some PDF files didn't have an EOL marker as required # str = @scanner.scan_until(/(\r\n|\r|\n)endstream/) # instead, a non-strict RegExp is used: