diff --git a/plugins/nes/Nes.cpp b/plugins/nes/Nes.cpp index b1b6c4e5a..84f08c6b4 100644 --- a/plugins/nes/Nes.cpp +++ b/plugins/nes/Nes.cpp @@ -310,7 +310,7 @@ void NesObject::renderOutput( sampleFrame * buf, fpp_t frames ) //////////////////////////////// // make sure we don't overflow - m_ch3Counter = m_wlen2 ? m_ch2Counter % m_wlen2 : 0; + m_ch3Counter = m_wlen3 ? m_ch3Counter % m_wlen3 : 0; // render triangle wave if( m_wlen3 <= m_maxWlen && ch3Enabled )