summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/sound/sid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/sound/sid.cpp')
-rw-r--r--src/devices/sound/sid.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/devices/sound/sid.cpp b/src/devices/sound/sid.cpp
index de56c65106e..26ba13a1f4b 100644
--- a/src/devices/sound/sid.cpp
+++ b/src/devices/sound/sid.cpp
@@ -209,7 +209,7 @@ void SID6581_t::init()
{
optr[v].sid = this;
- int mod_voi = (v - 1) % max_voices;
+ u8 const mod_voi = ((v + max_voices) - 1) % max_voices;
optr[v].modulator = &optr[mod_voi];
optr[mod_voi].carrier = &optr[v];
optr[v].filtVoiceMask = 1 << v;