fix 128 instrument song failing to read

This commit is contained in:
tildearrow 2022-01-03 03:35:13 -05:00
parent cbc39909e4
commit 7ed1777bdc
3 changed files with 20 additions and 2 deletions

View file

@ -622,7 +622,7 @@ bool DivEngine::load(unsigned char* f, size_t slen) {
}
if (ds.version>0x03) {
ds.insLen=reader.readC();
ds.insLen=(unsigned char)reader.readC();
} else {
ds.insLen=16;
}
@ -905,7 +905,7 @@ bool DivEngine::load(unsigned char* f, size_t slen) {
}
}
ds.sampleLen=reader.readC();
ds.sampleLen=(unsigned char)reader.readC();
logI("reading samples (%d)...\n",ds.sampleLen);
if (ds.version<0x0b && ds.sampleLen>0) { // TODO what is this for?
reader.readC();