Previous 199869 Revisions Next

r33939 Thursday 18th December, 2014 at 07:27:14 UTC by Fabrice Bellet
debug: fix a string overflow in comments
[src/emu/debug]dvdisasm.c

trunk/src/emu/debug/dvdisasm.c
r242450r242451
420420         offs_t comment_address = source.m_space.byte_to_address(m_byteaddress[instr]);
421421         const char *text = source.m_device.debug()->comment_text(comment_address);
422422         if (text != NULL)
423            sprintf(&destbuf[m_divider2], "// %.*s", row_width - m_divider2 - 1, text);
423            sprintf(&destbuf[m_divider2], "// %.*s", row_width - m_divider2 - 4, text);
424424      }
425425
426426      // see if the line changed at all


Previous 199869 Revisions Next


© 1997-2024 The MAME Team