From 57526c6c377d84bf7dd0cbe97caf613d8ef7bef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20Panzenb=C3=B6ck?= Date: Fri, 24 Jun 2011 01:50:43 +0200 Subject: [PATCH] IT: add term. NUL to messages --- taglib/it/itfile.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/taglib/it/itfile.cpp b/taglib/it/itfile.cpp index ed175c85..183a4f00 100644 --- a/taglib/it/itfile.cpp +++ b/taglib/it/itfile.cpp @@ -131,6 +131,10 @@ bool IT::File::save() for(uint i = instrumentCount + sampleCount; i < lines.size(); ++ i) messageLines.append(lines[i]); ByteVector message = messageLines.toString("\r").data(String::Latin1); + + // it's actually not really stated if the message needs a + // terminating NUL but it does not hurt to add one: + message.append((char)0); if(message.size() > 8000) message.resize(8000);