amstrad/pda600_copro.cpp: Guard against malformed frame.

namco/wacky_gator.cpp: Initialise a couple of variables.
This commit is contained in:
Sandro Ronco 2023-07-03 22:50:15 +02:00
parent 0726d8d34b
commit b07fcebbc2
2 changed files with 9 additions and 1 deletions

View File

@ -364,6 +364,13 @@ void pda600_copro_device::received_byte(u8 byte)
return;
}
if (m_buf[1] == 0)
{
logerror("PDA600: malformed frame\n");
send_byte(PDA600_NAK);
return;
}
switch (m_buf[2])
{
case 'T': // Train a character

View File

@ -92,7 +92,7 @@ private:
uint8_t m_adpcm_ctrl;
uint8_t m_alligators_ctrl;
int m_motors_pos[5];
int m_motors_pos[5] = { };
};
@ -199,6 +199,7 @@ void wackygtr_state::machine_reset()
m_adpcm_pos = 0;
m_adpcm_sel = 0;
m_adpcm_ctrl = 0x80;
m_alligators_ctrl = 0;
}
void wackygtr_state::set_digits(int p, uint8_t value)