From 3bc9d82f67cb6526bd87478b7ac2a7a16d97fbb7 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Mon, 8 Jul 2024 21:14:02 -0400 Subject: [PATCH] get rid of left shift Co-Authored-By: nukeykt --- src/sound/snd_opl_nuked.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/snd_opl_nuked.c b/src/sound/snd_opl_nuked.c index d8c8a948c..b1540a94c 100644 --- a/src/sound/snd_opl_nuked.c +++ b/src/sound/snd_opl_nuked.c @@ -612,7 +612,7 @@ env_calc(slot_t *slot) if (!slot->eg_rout) slot->eg_gen = envelope_gen_num_decay; else if (slot->key && shift > 0 && rate_hi != 0x0f) - eg_inc = ((~slot->eg_rout) << shift) >> 4; + eg_inc = ~slot->eg_rout >> (4 - shift); break; case envelope_gen_num_decay: