From: Mathias Panzenböck Date: Sat, 18 Jun 2011 01:38:18 +0000 (+0200) Subject: xm: no \n too much in comment if there are no samples X-Git-Tag: v1.8beta~94 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a31b0bcf8cf3cb394031fe5f91b512a04e904397;p=taglib xm: no \n too much in comment if there are no samples --- diff --git a/taglib/xm/xmfile.cpp b/taglib/xm/xmfile.cpp index 5efc2204..44fbe5ab 100644 --- a/taglib/xm/xmfile.cpp +++ b/taglib/xm/xmfile.cpp @@ -185,5 +185,11 @@ void XM::File::read(bool) seek(pos + instrumentSize + sampleHeaderSize * sampleCount + sumSampleLength); } - d->tag.setComment(intrumentNames.toString("\n") + "\n" + sampleNames.toString("\n")); + String comment(intrumentNames.toString("\n")); + if(sampleNames.size() > 0) + { + comment += "\n"; + comment += sampleNames.toString("\n"); + } + d->tag.setComment(comment); }