From cd0f0b00867bbd2424fef9f86fd384c004c8e2d4 Mon Sep 17 00:00:00 2001 From: Scott Wheeler Date: Thu, 19 Jul 2007 00:44:37 +0000 Subject: [PATCH] Don't include empty strings in the text field list. This is a slight deviation from the standard, but major editors (i.e. iTunes) mess up ID3v2 text frames with null termination (which technically indicates a field with content, plus an empty field). git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@689739 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- taglib/mpeg/id3v2/frames/textidentificationframe.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/taglib/mpeg/id3v2/frames/textidentificationframe.cpp b/taglib/mpeg/id3v2/frames/textidentificationframe.cpp index 3f7c7218..9a9eddee 100644 --- a/taglib/mpeg/id3v2/frames/textidentificationframe.cpp +++ b/taglib/mpeg/id3v2/frames/textidentificationframe.cpp @@ -126,8 +126,10 @@ void TextIdentificationFrame::parseFields(const ByteVector &data) // type is the same specified for this frame for(ByteVectorList::Iterator it = l.begin(); it != l.end(); it++) { - String s(*it, d->textEncoding); - d->fieldList.append(s); + if(!(*it).isEmpty()) { + String s(*it, d->textEncoding); + d->fieldList.append(s); + } } } -- 2.40.0