diff options
-rw-r--r-- | src/mame/drivers/tutor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mame/drivers/tutor.cpp b/src/mame/drivers/tutor.cpp index 5499cf23f73..c8f20d8d6e5 100644 --- a/src/mame/drivers/tutor.cpp +++ b/src/mame/drivers/tutor.cpp @@ -296,13 +296,13 @@ READ8_MEMBER( tutor_state::key_r ) char port[12]; uint8_t value; - snprintf(port, ARRAY_LENGTH(port), "LINE%d", offset >> 3); + snprintf(port, ARRAY_LENGTH(port), "LINE%d", (offset & 0x007e) >> 3); value = ioport(port)->read(); /* hack for ports overlapping with joystick */ if (offset >= 32 && offset < 48) { - snprintf(port, ARRAY_LENGTH(port), "LINE%d_alt", offset >> 3); + snprintf(port, ARRAY_LENGTH(port), "LINE%d_alt", (offset & 0x007e) >> 3); value |= ioport(port)->read(); } |