From 5abf5df74f4dcab06a50093d9aaeda1b41ac844f Mon Sep 17 00:00:00 2001 From: tildearrow Date: Sat, 11 Feb 2023 18:37:36 -0500 Subject: [PATCH] minor fix 2 --- extern/vgsound_emu-modified/vgsound_emu/src/es550x/es5506.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extern/vgsound_emu-modified/vgsound_emu/src/es550x/es5506.cpp b/extern/vgsound_emu-modified/vgsound_emu/src/es550x/es5506.cpp index 9f65292ff..4860c0bde 100644 --- a/extern/vgsound_emu-modified/vgsound_emu/src/es550x/es5506.cpp +++ b/extern/vgsound_emu-modified/vgsound_emu/src/es550x/es5506.cpp @@ -60,7 +60,8 @@ void es5506_core::voice_tick() m_ch[i].reset(); } // Update voice - for (int i=0; i<(VGS_CLAMP(m_active,4,31)+1); i++) { + const int total=VGS_CLAMP(m_active,4,31); + for (int i=0; i<=total; i++) { m_voice[i].tick(i); const u8 ca = m_voice[i].cr().ca()&7;