summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/cpu/z80/z80.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/cpu/z80/z80.cpp')
-rw-r--r--src/devices/cpu/z80/z80.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/devices/cpu/z80/z80.cpp b/src/devices/cpu/z80/z80.cpp
index 86a65ed3169..a43fec45327 100644
--- a/src/devices/cpu/z80/z80.cpp
+++ b/src/devices/cpu/z80/z80.cpp
@@ -555,7 +555,9 @@ uint8_t z80_device::arg()
uint16_t z80_device::arg16()
{
- return arg() | (arg() << 8);
+ u8 const res = arg();
+
+ return (u16(arg()) << 8) | res;
}
/***************************************************************