mirror of
https://github.com/holub/mame
synced 2025-04-25 17:56:43 +03:00
subsino_io.cpp: Fix out-of-bounds accesses
This commit is contained in:
parent
f501d04115
commit
da1e118b55
@ -124,7 +124,7 @@ u8 ss9602_device::read(offs_t offset)
|
||||
else if (offset == 0x12)
|
||||
return read_port_data(9) & 0x0f;
|
||||
else if (offset >= 0x18 && offset <= 0x1e)
|
||||
return "SUBSION"[offset];
|
||||
return "SUBSION"[offset - 0x18];
|
||||
else
|
||||
{
|
||||
if (!machine().side_effects_disabled())
|
||||
@ -156,7 +156,7 @@ u8 ss9802_device::read(offs_t offset)
|
||||
else if (offset <= 0x09)
|
||||
return read_port_data(offset);
|
||||
else if (offset >= 0x13 && offset <= 0x19)
|
||||
return "SUBSINO"[offset]; // for xtrain
|
||||
return "SUBSINO"[offset - 0x13]; // for xtrain
|
||||
else
|
||||
{
|
||||
if (!machine().side_effects_disabled())
|
||||
|
Loading…
Reference in New Issue
Block a user