From 1eb30cf5740d34c4c67f07625587039c3c27cc52 Mon Sep 17 00:00:00 2001 From: REDxEYE Date: Mon, 5 May 2025 00:31:22 +0300 Subject: [PATCH] Update src/PIL/VtfImagePlugin.py Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com> --- src/PIL/VtfImagePlugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PIL/VtfImagePlugin.py b/src/PIL/VtfImagePlugin.py index 28ff320e4..6a1b06735 100644 --- a/src/PIL/VtfImagePlugin.py +++ b/src/PIL/VtfImagePlugin.py @@ -391,7 +391,7 @@ def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None: def _accept(prefix: bytes) -> bool: - valid_header = prefix[:4] == b"VTF\x00" + valid_header = prefix.startswith("VTF\x00") valid_version = struct.unpack_from("<2I", prefix, 4) >= (7, 0) return valid_header and valid_version