From a56fae387b25733e441d62dfead870de0e2a2464 Mon Sep 17 00:00:00 2001 From: Johannes Schultz Date: Mon, 18 Nov 2024 21:27:12 +0000 Subject: [PATCH] [Fix] IMF: It was still possible that we were shifting by 64 bits. git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@22229 56274372-70c3-4bfc-bfc3-4c3a0b034d27 --- soundlib/Load_imf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soundlib/Load_imf.cpp b/soundlib/Load_imf.cpp index 95dd5b3120c..659505ec4b4 100644 --- a/soundlib/Load_imf.cpp +++ b/soundlib/Load_imf.cpp @@ -437,7 +437,7 @@ bool CSoundFile::ReadIMF(FileReader &file, ModLoadingFlags loadFlags) // Read channel configuration std::bitset<32> ignoreChannels; // bit set for each channel that's completely disabled - uint64 channelMuteStatus = static_cast(0xAAAA'AAAA) << (GetNumChannels() * 2); + uint64 channelMuteStatus = 0; for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { ChnSettings[chn].nPan = static_cast(fileHeader.channels[chn].panning * 256 / 255); @@ -459,7 +459,7 @@ bool CSoundFile::ReadIMF(FileReader &file, ModLoadingFlags loadFlags) } // BEHIND.IMF: All channels but the first are muted // mikmod refers to this as an Orpheus bug, but I haven't seen any other files like this, so maybe it's just an incorrectly saved file? - if(channelMuteStatus == 0xAAAA'AAAA'5555'5554) + if(GetNumChannels() == 16 && channelMuteStatus == 0x5555'5554) { for(CHANNELINDEX chn = 1; chn < GetNumChannels(); chn++) ChnSettings[chn].dwFlags.reset(CHN_MUTE);