summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatarGravatar Olivier Galibert <galibert@pobox.com>2017-11-28 09:09:02 +0100
committerGravatarGravatar Olivier Galibert <galibert@pobox.com>2017-11-28 09:10:09 +0100
commitb2478329475250e8a74104c234461a754347fdb2 (patch) (github)
treecdbcb8a948da85fc529fc80da4f5827040fd007a
parentcec449c33b4244a1adef7281b83e959105fe5056 (diff)
downloadmame-b2478329475250e8a74104c234461a754347fdb2.tar.bz2
mame-b2478329475250e8a74104c234461a754347fdb2.zip
Nice subtle one coverity (nw)
-rw-r--r--src/emu/debug/debugbuf.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/emu/debug/debugbuf.cpp b/src/emu/debug/debugbuf.cpp
index 4bae66cbab9..e181c859a51 100644
--- a/src/emu/debug/debugbuf.cpp
+++ b/src/emu/debug/debugbuf.cpp
@@ -815,7 +815,7 @@ void debug_disasm_buffer::debug_data_buffer::setup_methods()
m_do_r64 = [this](offs_t pc) -> u64 {
fill(pc, 4);
const u16 *src = get_ptr<u16>(pc);
- return (u64(src[0]) << 48) | (u64(src[1]) << 32) | (src[2] << 16) | src[3];
+ return (u64(src[0]) << 48) | (u64(src[1]) << 32) | u32(src[2] << 16) | src[3];
};
}
break;
@@ -872,7 +872,7 @@ void debug_disasm_buffer::debug_data_buffer::setup_methods()
m_do_r64 = [this](offs_t pc) -> u64 {
fill(pc, 8);
const u8 *src = get_ptr<u8>(pc);
- return src[0] | (src[1] << 8) | (src[2] << 16) | (src[3] << 24) |
+ return src[0] | (src[1] << 8) | (src[2] << 16) | u32(src[3] << 24) |
(u64(src[4]) << 32) | (u64(src[5]) << 40) | (u64(src[6]) << 48) | (u64(src[7]) << 56);
};
}