Skip to content

Commit 6c2d575

Browse files
radarherehugovk
andauthored
Simplified passing of data to _accept
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
1 parent 9b6fdd7 commit 6c2d575

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/PIL/BmpImagePlugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def _open(self):
263263
# read 14 bytes: magic number, filesize, reserved, header final offset
264264
head_data = self.fp.read(14)
265265
# choke if the file does not have the required magic bytes
266-
if not _accept(head_data[0:2]):
266+
if not _accept(head_data):
267267
raise SyntaxError("Not a BMP file")
268268
# read the start position of the BMP image data (u32)
269269
offset = i32(head_data[10:14])

0 commit comments

Comments
 (0)