Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UINT16 m_rotate_ctrl[8];
- static MACHINE_RESET( wgp )
- {
- wgp_state *state = machine.driver_data<wgp_state>();
- int i;
- state->m_banknum = 0;
- state->m_cpua_ctrl = 0xff;
- state->m_port_sel = 0;
- state->m_piv_ctrl_reg = 0;
- for (i = 0; i < 3; i++)
- {
- state->m_piv_zoom[i] = 0;
- state->m_piv_scrollx[i] = 0;
- state->m_piv_scrolly[i] = 0;
- }
- memset(state->m_rotate_ctrl, 0, 8);
- }
- This suspicious code was found in MAME project by PVS-Studio static code analyzer.
- Warning message is:
- V512 A call of the 'memset' function will lead to underflow of the buffer 'state->m_rotate_ctrl'. wgp.c 949
- PVS-Studio is a static analyzer for detecting bugs in the source code of applications written in C, C++, C++11, C++/CX. Site: http://www.viva64.com/en/pvs-studio/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement