AUDIO: Fix UB shift of negative integer in AdLib driver

This commit is contained in:
Colin Snover 2017-11-29 19:27:57 -06:00
parent 02614f2f1a
commit 1871c7dfea

View file

@ -1796,7 +1796,7 @@ void MidiDriver_ADLIB::adlibSetParam(int channel, byte param, int value, bool pr
value -= 15;
else
value -= 383;
value <<= 4;
value *= 16;
_channelTable2[channel] = value;
adlibPlayNote(channel, _curNotTable[channel] + value);
return;