From 7ec3e8b26f6edfc4913ef458b9d6c9734a1a69a5 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 11 Feb 2016 16:18:23 +0530 Subject: [PATCH] fix eol check --- Shared/lib/python3.4/site-packages/PyPDF2/pdf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Shared/lib/python3.4/site-packages/PyPDF2/pdf.py b/Shared/lib/python3.4/site-packages/PyPDF2/pdf.py index d3d4947..1987ccd 100644 --- a/Shared/lib/python3.4/site-packages/PyPDF2/pdf.py +++ b/Shared/lib/python3.4/site-packages/PyPDF2/pdf.py @@ -1933,13 +1933,13 @@ class PdfFileReader(object): while eol+1 < len(x) and x[eol+1] in (b_('\n'), b_('\r')): eol += 1 line = x[eol+1:] + line - while x[eol] in (b_('\n'), b_('\r')): + while x[eol:eol+1] in (b_('\n'), b_('\r')): eol -= 1 - stream.seek(-step+eol-2, 1) + stream.seek(-step+eol, 1) break else: line = x + line - stream.seek(-step-2, 1) + stream.seek(-step, 1) if debug: print("leaving RNEL") return line