Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adpcm[6] out of range in fm.cpp #13

Open
gtoal opened this issue Aug 10, 2019 · 0 comments
Open

adpcm[6] out of range in fm.cpp #13

gtoal opened this issue Aug 10, 2019 · 0 comments

Comments

@gtoal
Copy link

gtoal commented Aug 10, 2019

adpcm is declared with size 6 so the last element is 5:

case 2:	/* status 1 : + ADPCM status */
	/* BUSY:x:PCMBUSY:ZERO:BRDY:EOS:FLAGB:FLAGA */
	if(addr==0xff) ret = 0x00; /* ID code */
	else ret = F2608->OPN.ST.status | (F2608->adpcm[6].flag ? 0x20 : 0);
	break;

Not a hard one to spot - the compiler even tells you about it every time you compile.

My guess is that element [5] is the one that's wanted?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant