From 9171ce8d32ef99f598ec1c1eefed07e13616e54c Mon Sep 17 00:00:00 2001 From: Nikolay Tischenko Date: Mon, 8 Nov 2010 00:31:16 +0600 Subject: [PATCH] Fixed broken image issue in taglib --- .../mpeg/id3v2/frames/attachedpictureframe.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/taglib/mpeg/id3v2/frames/attachedpictureframe.cpp b/src/taglib/mpeg/id3v2/frames/attachedpictureframe.cpp index a763e18..cd58360 100644 --- a/src/taglib/mpeg/id3v2/frames/attachedpictureframe.cpp +++ b/src/taglib/mpeg/id3v2/frames/attachedpictureframe.cpp @@ -133,7 +133,7 @@ void AttachedPictureFrame::parseFields(const ByteVector &data) d->textEncoding = String::Type(data[0]); - int pos = 1; + int pos = 1, poss = 1; d->mimeType = readStringField(data, String::Latin1, &pos); /* Now we need at least two more bytes available */ @@ -143,9 +143,11 @@ void AttachedPictureFrame::parseFields(const ByteVector &data) } d->type = (TagLib::ID3v2::AttachedPictureFrame::Type)data[pos++]; + + poss = pos; d->description = readStringField(data, d->textEncoding, &pos); - d->data = data.mid(pos); + d->data = data.mid(poss); } ByteVector AttachedPictureFrame::renderFields() const -- 1.7.9.5