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); }