bring crash fix from 0.5.8

This commit is contained in:
tildearrow 2022-02-24 22:52:20 -05:00
parent dee74e7b14
commit 19c4f5559a
11 changed files with 33 additions and 25 deletions

View file

@ -436,7 +436,7 @@ int DivPlatformYM2610::dispatch(DivCommand c) {
immWrite(0x128+c.chan-7,0);
break;
}
DivSample* s=parent->song.sample[12*sampleBank+c.value%12];
DivSample* s=parent->getSample(12*sampleBank+c.value%12);
immWrite(0x110+c.chan-7,(s->offA>>8)&0xff);
immWrite(0x118+c.chan-7,s->offA>>16);
int end=s->offA+s->lengthA-1;