From: <sag...@us...> - 2013-05-30 18:09:03
|
Revision: 2233 http://sourceforge.net/p/modplug/code/2233 Author: saga-games Date: 2013-05-30 18:08:56 +0000 (Thu, 30 May 2013) Log Message: ----------- [Fix] Sample Editor: Fixed crash when trying to trigger a note > B-9. [Fix] Fixed theoretically possible crash when converting periods to frequencies in XM files. Modified Paths: -------------- trunk/OpenMPT/mptrack/View_smp.cpp trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/mptrack/View_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_smp.cpp 2013-05-30 16:18:16 UTC (rev 2232) +++ trunk/OpenMPT/mptrack/View_smp.cpp 2013-05-30 18:08:56 UTC (rev 2233) @@ -2226,8 +2226,7 @@ if (note >= NOTE_MIN_SPECIAL) { pModDoc->NoteOff(0, (note == NOTE_NOTECUT)); - } - else + } else if(ModCommand::IsNote((ModCommand::NOTE)note)) { if (m_dwStatus & SMPSTATUS_KEYDOWN) pModDoc->NoteOff(note, true); Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2013-05-30 16:18:16 UTC (rev 2232) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2013-05-30 18:08:56 UTC (rev 2233) @@ -4713,6 +4713,7 @@ return (XMLinearTable[period % 768] << FREQ_FRACBITS) >> octave; } else { + if(!period) period = 1; return ((8363 * 1712L) << FREQ_FRACBITS) / period; } } else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |