From fd27819cdd0ab01b95ac6c199242b97243131c64 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Wed, 5 Aug 2026 21:22:53 -0400 Subject: [PATCH] =?UTF-8?q?style(scanner):=20tagged=20switch=20on=20ID3=20?= =?UTF-8?q?major=20version=20=E2=80=94=20#2499?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/library/id3v2genre.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/library/id3v2genre.go b/internal/library/id3v2genre.go index f8eacaf3..7dbb15ce 100644 --- a/internal/library/id3v2genre.go +++ b/internal/library/id3v2genre.go @@ -141,10 +141,10 @@ func findGenreFrame(body []byte, major byte) ([]string, error) { // the reverse) yields a plausible-looking wrong offset rather than an obvious // error, which is exactly how frame-walking bugs go unnoticed. func frameSize(b []byte, major byte) int { - switch { - case major == 2: + switch major { + case 2: return int(b[0])<<16 | int(b[1])<<8 | int(b[2]) - case major == 3: + case 3: n := binary.BigEndian.Uint32(b) if n > maxID3TagSize { return -1