From 13e4cb1528f36d3514fa6d7f26eb4028194c5b07 Mon Sep 17 00:00:00 2001 From: JP Cimalando Date: Thu, 30 Aug 2018 11:01:42 +0200 Subject: fix a case of miscalculation and infinite loop --- src/adlmidi_midiplay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/adlmidi_midiplay.cpp') diff --git a/src/adlmidi_midiplay.cpp b/src/adlmidi_midiplay.cpp index 49aa119..f405489 100644 --- a/src/adlmidi_midiplay.cpp +++ b/src/adlmidi_midiplay.cpp @@ -1599,7 +1599,7 @@ void MIDIplay::setRPN(size_t midCh, unsigned value, bool MSB) case 0x0109 + 1*0x10000 + 1*0x20000: if((m_synthMode & Mode_XG) != 0) // Vibrato depth { - m_midiChannels[midCh].vibdepth = ((value - 64) * 0.15) * 0.01; + m_midiChannels[midCh].vibdepth = (((int)value - 64) * 0.15) * 0.01; } break; case 0x010A + 1*0x10000 + 1*0x20000: -- cgit v1.2.3