From da1e118b554359f2740a7aa016ef1335babd6a97 Mon Sep 17 00:00:00 2001 From: AJR Date: Mon, 15 May 2023 20:23:39 -0400 Subject: subsino_io.cpp: Fix out-of-bounds accesses --- src/mame/subsino/subsino_io.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mame/subsino/subsino_io.cpp b/src/mame/subsino/subsino_io.cpp index e608e8976e7..ee93618d3c7 100644 --- a/src/mame/subsino/subsino_io.cpp +++ b/src/mame/subsino/subsino_io.cpp @@ -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()) -- cgit v1.2.3