mirror of
https://github.com/holub/mame
synced 2025-04-27 18:53:05 +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)
|
else if (offset == 0x12)
|
||||||
return read_port_data(9) & 0x0f;
|
return read_port_data(9) & 0x0f;
|
||||||
else if (offset >= 0x18 && offset <= 0x1e)
|
else if (offset >= 0x18 && offset <= 0x1e)
|
||||||
return "SUBSION"[offset];
|
return "SUBSION"[offset - 0x18];
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!machine().side_effects_disabled())
|
if (!machine().side_effects_disabled())
|
||||||
@ -156,7 +156,7 @@ u8 ss9802_device::read(offs_t offset)
|
|||||||
else if (offset <= 0x09)
|
else if (offset <= 0x09)
|
||||||
return read_port_data(offset);
|
return read_port_data(offset);
|
||||||
else if (offset >= 0x13 && offset <= 0x19)
|
else if (offset >= 0x13 && offset <= 0x19)
|
||||||
return "SUBSINO"[offset]; // for xtrain
|
return "SUBSINO"[offset - 0x13]; // for xtrain
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!machine().side_effects_disabled())
|
if (!machine().side_effects_disabled())
|
||||||
|
Loading…
Reference in New Issue
Block a user