From ae005145bc400841e1e279742faa5f863af0dc6c Mon Sep 17 00:00:00 2001 From: upperstream Date: Sat, 9 Jul 2016 17:49:28 +0900 Subject: [PATCH] Fix: Track() for ID3v1.1 picked a wrong byte for the track number delimeter in the comment field. This results in neither the track number nor the comment being set properly. --- id3v1.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/id3v1.go b/id3v1.go index 8e66e22..00ad891 100644 --- a/id3v1.go +++ b/id3v1.go @@ -75,16 +75,16 @@ func ReadID3v1Tags(r io.ReadSeeker) (Metadata, error) { return nil, err } - commentBytes, err := readBytes(r, 29) + commentBytes, err := readBytes(r, 30) if err != nil { return nil, err } var comment string var track int - if commentBytes[27] == 0 { + if commentBytes[28] == 0 { comment = strings.TrimSpace(string(commentBytes[:28])) - track = int(commentBytes[28]) + track = int(commentBytes[29]) } var genre string