From: <sv...@op...> - 2024-12-01 18:14:02
|
Author: sagamusix Date: Sun Dec 1 19:13:50 2024 New Revision: 22431 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=22431 Log: Merged revision(s) 22424 from trunk/OpenMPT: [Fix] MIDI Macros: An unfinished byte right before a "s" SysEx checksum macro letter was not considered in the checksum. ........ Modified: branches/OpenMPT-1.31/ (props changed) branches/OpenMPT-1.31/soundlib/Snd_fx.cpp Modified: branches/OpenMPT-1.31/soundlib/Snd_fx.cpp ============================================================================== --- branches/OpenMPT-1.31/soundlib/Snd_fx.cpp Sun Dec 1 19:13:20 2024 (r22430) +++ branches/OpenMPT-1.31/soundlib/Snd_fx.cpp Sun Dec 1 19:13:50 2024 (r22431) @@ -5165,6 +5165,12 @@ } else if(macro[pos] == 's') { // SysEx Checksum (not an original Impulse Tracker macro variable, but added for convenience) + if(!firstNibble) // From MIDI.TXT: '9n' is exactly the same as '09 n' or '9 n' -- so finish current byte first + { + outPos++; + firstNibble = true; + } + auto startPos = outPos; while(startPos > 0 && out[--startPos] != 0xF0) ; |