From 3a977c55c411d186619b22374e31748021276017 Mon Sep 17 00:00:00 2001 From: Scott Wheeler Date: Mon, 18 May 2015 17:29:52 +0200 Subject: [PATCH] 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 --- tests/test_id3v2.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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());