summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Robbbert <Robbbert@users.noreply.github.com>2021-03-03 16:58:50 +1100
committer Robbbert <Robbbert@users.noreply.github.com>2021-03-03 16:58:50 +1100
commit4d73f8fafc096c8eaf3e2efab5b4becad3299e99 (patch)
tree6382e930f8edea516be84bd21181a0a17d72638e /src
parent26da221febba3e5a4fafd1619fbc48f40e982b6e (diff)
mz2500: Coverity 138615 (wrong calculations)
Diffstat (limited to 'src')
-rw-r--r--src/mame/drivers/mz2500.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mame/drivers/mz2500.cpp b/src/mame/drivers/mz2500.cpp
index 77d9663b169..83cbf72081c 100644
--- a/src/mame/drivers/mz2500.cpp
+++ b/src/mame/drivers/mz2500.cpp
@@ -534,10 +534,10 @@ void mz2500_state::mz2500_reconfigure_screen()
m_screen->configure(720, 480, visarea, m_screen->frame_period().attoseconds());
/* calculate CG window parameters here */
- m_cg_vs = (m_cg_reg[0x08]) | ((m_cg_reg[0x09]<<8) & 1);
- m_cg_ve = (m_cg_reg[0x0a]) | ((m_cg_reg[0x0b]<<8) & 1);
- m_cg_hs = ((m_cg_reg[0x0c] & 0x7f)*8);
- m_cg_he = ((m_cg_reg[0x0d] & 0x7f)*8);
+ m_cg_vs = m_cg_reg[0x08] | (BIT(m_cg_reg[0x09], 0)<<8);
+ m_cg_ve = m_cg_reg[0x0a] | (BIT(m_cg_reg[0x0b], 0)<<8);
+ m_cg_hs = (m_cg_reg[0x0c] & 0x7f)*8;
+ m_cg_he = (m_cg_reg[0x0d] & 0x7f)*8;
if(m_scr_x_size == 320)
{