Closed nyanpasu64 closed 6 years ago
ChannelsN163.cpp:
if (EffParam + (m_iWaveLen >> 1) > 0x80 - 8 * m_iChannels) break;
CChannelHandlerN163::HandleEffect uses m_iWaveLen from previous frame.
Bug appears on HertzDevil master:
Test Case: n163-zxx-validation.zip
Bug analysis: https://github.com/jimbo1qaz/0CC-FamiTracker/wiki/N163-Zxx
http://hertzdevil.info/forum/index.php/topic,10.0.html ch2 mistakenly concludes there isn't room, when Z31+. tested on 0.3.14.5 and master.
When you switch instruments, 0CC doesn't realize the wave size changed until 1 row afterwards. This results in incorrect checking of whether Zxx is allowed. If not allowed, the previous Zxx remains (even if OOB).
Test Case: n163-zxx-validation.zip Bug analysis: https://github.com/jimbo1qaz/0CC-FamiTracker/wiki/N163-Zxx