Fix compile again

This commit is contained in:
cam900 2023-04-11 12:55:09 +09:00
parent cb34054473
commit f66b703a81

View file

@ -138,12 +138,12 @@ void d65010g031_write(struct d65010g031_t *d65010g031, const unsigned char a, co
d65010g031->ctrl = d; d65010g031->ctrl = d;
break; break;
default: default:
unsigned char period = ~d & 0x3f; unsigned char per = (unsigned char)(~d) & 0x3f;
if ((period == 0) && (d65010g031->square[a].period != 0)) if ((per == 0) && (d65010g031->square[a].period != 0))
{ {
d65010g031->square[a].out ^= 1; d65010g031->square[a].out ^= 1;
} }
d65010g031->square[a].period = period; d65010g031->square[a].period = per;
break; break;
} }
} }