From: <sv...@op...> - 2025-04-10 18:56:49
|
Author: sagamusix Date: Thu Apr 10 20:56:26 2025 New Revision: 23130 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=23130 Log: [Mod] MOD: The last three bytes of the Tetramed tag can vary. Check that they are present but don't verify their contents. Modified: trunk/OpenMPT/soundlib/Load_mod.cpp Modified: trunk/OpenMPT/soundlib/Load_mod.cpp ============================================================================== --- trunk/OpenMPT/soundlib/Load_mod.cpp Tue Apr 8 19:30:41 2025 (r23129) +++ trunk/OpenMPT/soundlib/Load_mod.cpp Thu Apr 10 20:56:26 2025 (r23130) @@ -700,7 +700,7 @@ // XOR with 0xDF gives the message "TakeTrackered with version 0.9E!!!!!" if(GetNumChannels() <= 16 && file.ReadMagic("\x8B\xBE\xB4\xBA\x8B\xAD\xBE\xBC\xB4\xBA\xAD\xBA\xBB\xFF\xA8\xB6\xAB\xB7\xFF\xA9\xBA\xAD\xAC\xB6\xB0\xB1\xFF\xEF\xF1\xE6\xBA\xFE\xFE\xFE\xFE\xFE")) modMagicResult.madeWithTracker = UL_("TakeTracker"); - else if(isMdKd && file.ReadArray<char, 9>() == std::array<char, 9>{0x00, 0x11, 0x55, 0x33, 0x22, 0x11, 0x04, 0x01, 0x01}) + else if(isMdKd && file.ReadArray<char, 6>() == std::array<char, 9>{0x00, 0x11, 0x55, 0x33, 0x22, 0x11} && file.CanRead(3)) // 3 more bytes that differ between modules and Tetramed version, purpose unknown modMagicResult.madeWithTracker = UL_("Tetramed"); } |