From: Scott Wheeler Date: Mon, 18 May 2015 15:29:52 +0000 (+0200) Subject: We've moved away from including the null byte in the returned value X-Git-Tag: v1.10beta~98 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3a977c55c411d186619b22374e31748021276017;p=taglib We've moved away from including the null byte in the returned value This does change previous behavior, but the previous behavior was particularly stupid and inconsistent with everything else in TagLib. It should be possible to mitigate this by putting the same safety guards in the TableOfContents --- diff --git a/tests/test_id3v2.cpp b/tests/test_id3v2.cpp index 3a189393..be16fd0b 100644 --- a/tests/test_id3v2.cpp +++ b/tests/test_id3v2.cpp @@ -895,7 +895,7 @@ public: ByteVector("CHAP" // Frame ID "\x00\x00\x00\x20" // Frame size "\x00\x00" // Frame flags - "\x43\x00" // Element ID + "\x43\x00" // Element ID ("C") "\x00\x00\x00\x03" // Start time "\x00\x00\x00\x05" // End time "\x00\x00\x00\x02" // Start offset @@ -909,7 +909,7 @@ public: ID3v2::ChapterFrame f1(&header, chapterData); - CPPUNIT_ASSERT_EQUAL(ByteVector("\x43\x00", 2), f1.elementID()); + CPPUNIT_ASSERT_EQUAL(ByteVector("C"), f1.elementID()); CPPUNIT_ASSERT((uint)0x03 == f1.startTime()); CPPUNIT_ASSERT((uint)0x05 == f1.endTime()); CPPUNIT_ASSERT((uint)0x02 == f1.startOffset()); @@ -918,7 +918,7 @@ public: ID3v2::ChapterFrame f2(&header, chapterData + embeddedFrameData); - CPPUNIT_ASSERT_EQUAL(ByteVector("\x43\x00", 2), f2.elementID()); + CPPUNIT_ASSERT_EQUAL(ByteVector("C"), f2.elementID()); CPPUNIT_ASSERT((uint)0x03 == f2.startTime()); CPPUNIT_ASSERT((uint)0x05 == f2.endTime()); CPPUNIT_ASSERT((uint)0x02 == f2.startOffset());