Skip to content

Commit 1eb30cf

Browse files
REDxEYEradarhere
andauthored
Update src/PIL/VtfImagePlugin.py
Co-authored-by: Andrew Murray <[email protected]>
1 parent f594d20 commit 1eb30cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PIL/VtfImagePlugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None:
391391

392392

393393
def _accept(prefix: bytes) -> bool:
394-
valid_header = prefix[:4] == b"VTF\x00"
394+
valid_header = prefix.startswith("VTF\x00")
395395
valid_version = struct.unpack_from("<2I", prefix, 4) >= (7, 0)
396396
return valid_header and valid_version
397397

0 commit comments

Comments
 (0)