From a31b0bcf8cf3cb394031fe5f91b512a04e904397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20Panzenb=C3=B6ck?= Date: Sat, 18 Jun 2011 03:38:18 +0200 Subject: [PATCH] xm: no \n too much in comment if there are no samples --- taglib/xm/xmfile.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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); }