From 440baccd2a28b9b311ad8645bf0013ddc3393eb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Mon, 12 May 2025 19:27:46 +0800 Subject: [PATCH] fix --- src/image-size/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/image-size/index.ts b/src/image-size/index.ts index c86ecd09..5caab259 100644 --- a/src/image-size/index.ts +++ b/src/image-size/index.ts @@ -126,7 +126,9 @@ class JpegParser implements ImageParser { // 寻找FF标记 if (buffer[offset] === 0xFF && buffer[offset + 1]! >= 0xC0 && buffer[offset + 1]! <= 0xCF) { const marker = buffer[offset + 1]; - if (!marker) break; + if (!marker) { + break; + } // 跳过非SOF标记 if (this.isNonSOFMarker(marker)) { offset += 2;