]> granicus.if.org Git - taglib/commitdiff
Don't try to write non-Latin1 values to ID3v1 tags since they'll ugly things will
authorScott Wheeler <wheeler@kde.org>
Wed, 30 Jan 2008 12:47:03 +0000 (12:47 +0000)
committerScott Wheeler <wheeler@kde.org>
Wed, 30 Jan 2008 12:47:03 +0000 (12:47 +0000)
happen when some of the characters are null.  This behavior can still be customized
via the StringHandler.

CCBUG:99149

git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@768597 283d02a7-25f6-0310-bc7c-ecb5cbfe19da

taglib/mpeg/id3v1/id3v1tag.cpp

index 0b8d12874df5179e9fc6c6b9c135e442d8f5a1c6..49162e5c3e90d04a355951002e2d9825a6e9e74e 100644 (file)
@@ -64,6 +64,11 @@ String ID3v1::StringHandler::parse(const ByteVector &data) const
 
 ByteVector ID3v1::StringHandler::render(const String &s) const
 {
+  if(!s.isLatin1())
+  {
+    return ByteVector();
+  }
+
   return s.data(String::Latin1);
 }