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
This commit is contained in:
Scott Wheeler 2015-05-18 17:29:52 +02:00
parent a094ce7dd2
commit 3a977c55c4

View File

@ -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());