From 1b0e92375aa85618e763049b7fca9ac9986d7581 Mon Sep 17 00:00:00 2001 From: David Howden Date: Sat, 27 Jun 2015 19:24:33 +1000 Subject: [PATCH] Fix: panic on empty description in text-description frames. --- id3v2frames.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/id3v2frames.go b/id3v2frames.go index de59371..23e4e8c 100644 --- a/id3v2frames.go +++ b/id3v2frames.go @@ -179,6 +179,10 @@ func readTextWithDescrFrame(b []byte, hasLang bool, encoded bool) (*Comm, error) } c.Description = desc + if len(descTextSplit) == 1 { + return c, nil + } + if !encoded { enc = byte(0) }