]> granicus.if.org Git - taglib/commitdiff
Don't list the description twice in `UserTextIdentificationFrame::toString()` (#853)
authorBert Wesarg <Bert.Wesarg@googlemail.com>
Tue, 9 Oct 2018 23:55:02 +0000 (01:55 +0200)
committerStephen F. Booth <me@sbooth.org>
Tue, 9 Oct 2018 23:55:02 +0000 (18:55 -0500)
taglib/mpeg/id3v2/frames/textidentificationframe.cpp

index db9a177e50f17bc76bbffe86cd152b380b1af6d9..61cf6ed8bba418e4d782484bf44780820e819850 100644 (file)
@@ -339,7 +339,13 @@ UserTextIdentificationFrame::UserTextIdentificationFrame(const String &descripti
 
 String UserTextIdentificationFrame::toString() const
 {
-  return "[" + description() + "] " + fieldList().toString();
+  // first entry is the description itself, drop from values list
+  StringList l = fieldList();
+  for(StringList::Iterator it = l.begin(); it != l.end(); ++it) {
+    l.erase(it);
+    break;
+  }
+  return "[" + description() + "] " + l.toString();
 }
 
 String UserTextIdentificationFrame::description() const