diff --git a/src/PIL/EpsImagePlugin.py b/src/PIL/EpsImagePlugin.py index 3a71b35cf..fcc2463b8 100644 --- a/src/PIL/EpsImagePlugin.py +++ b/src/PIL/EpsImagePlugin.py @@ -373,8 +373,7 @@ class EpsImageFile(ImageFile.ImageFile): s = str(bytes_mv[:bytes_read], "latin-1") _read_comment(s) - - if bytes_mv[:9] == b"%%Trailer": + elif bytes_mv[:9] == b"%%Trailer": trailer_reached = True bytes_read = 0