diff --git a/src/engine/platform/opl.cpp b/src/engine/platform/opl.cpp index 4e798c6e..2c6c1590 100644 --- a/src/engine/platform/opl.cpp +++ b/src/engine/platform/opl.cpp @@ -1509,7 +1509,7 @@ DivMacroInt* DivPlatformOPL::getChanMacroInt(int ch) { } DivDispatchOscBuffer* DivPlatformOPL::getOscBuffer(int ch) { - if (ch>=18) return NULL; + if (ch>=totalChans) return NULL; if (oplType==3 && ch<12) { if (chan[ch&(~1)].fourOp) { if (ch&1) {