From b885c04388e27aea85f2385d7a948fff25618618 Mon Sep 17 00:00:00 2001 From: hugovk Date: Thu, 26 Mar 2015 14:06:54 +0200 Subject: [PATCH] EPS parser: don't index blank lines --- PIL/EpsImagePlugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PIL/EpsImagePlugin.py b/PIL/EpsImagePlugin.py index d077ca1ab..83024b63f 100644 --- a/PIL/EpsImagePlugin.py +++ b/PIL/EpsImagePlugin.py @@ -275,13 +275,13 @@ class EpsImageFile(ImageFile.ImageFile): s = fp.readline().strip('\r\n') - if s[0] != "%": + if s[:1] != "%": break # # Scan for an "ImageData" descriptor - while s[0] == "%": + while s[:1] == "%": if len(s) > 255: raise SyntaxError("not an EPS file")