128 patterns are possible under .mod...

This commit is contained in:
tildearrow 2023-10-23 04:31:27 -05:00
parent 231a931c99
commit 9ca7d529eb

View file

@ -3149,8 +3149,8 @@ bool DivEngine::loadMod(unsigned char* file, size_t len) {
ds.sampleLen=ds.sample.size();
// orders
ds.subsong[0]->ordersLen=ordCount=reader.readC();
if (ds.subsong[0]->ordersLen<1 || ds.subsong[0]->ordersLen>127) {
ds.subsong[0]->ordersLen=ordCount=(unsigned char)reader.readC();
if (ds.subsong[0]->ordersLen<1 || ds.subsong[0]->ordersLen>128) {
logD("invalid order count!");
throw EndOfFileException(&reader,reader.tell());
}