mirror of
https://github.com/taglib/taglib.git
synced 2026-07-11 13:51:12 -04:00
Fix overflow for large Apple Music cnID values (#1373)
cnID must be longlong instead of int as Apple Music cnID values can now exceed the range of a 32-bit integer and require 64-bit aka longlong. --------- Co-authored-by: Urs Fleisch <ufleisch@users.sourceforge.net>
This commit is contained in:
@@ -883,6 +883,7 @@ public:
|
||||
tag->setItem("trkn", MP4::Item(2, 10));
|
||||
tag->setItem("rate", MP4::Item(80));
|
||||
tag->setItem("plID", MP4::Item(1540934238LL));
|
||||
tag->setItem("cnID", MP4::Item(9876543210LL));
|
||||
tag->setItem("rtng", MP4::Item(static_cast<unsigned char>(2)));
|
||||
f.save();
|
||||
}
|
||||
@@ -904,6 +905,7 @@ public:
|
||||
CPPUNIT_ASSERT_EQUAL(10, item.toIntPair().second);
|
||||
CPPUNIT_ASSERT_EQUAL(80, tag->item("rate").toInt());
|
||||
CPPUNIT_ASSERT_EQUAL(1540934238LL, tag->item("plID").toLongLong());
|
||||
CPPUNIT_ASSERT_EQUAL(9876543210LL, tag->item("cnID").toLongLong());
|
||||
CPPUNIT_ASSERT_EQUAL(static_cast<unsigned char>(2), tag->item("rtng").toByte());
|
||||
PropertyMap properties = tag->properties();
|
||||
CPPUNIT_ASSERT_EQUAL(StringList("123"), properties.value("TESTINTEGER"));
|
||||
|
||||
Reference in New Issue
Block a user