mirror of
https://github.com/holub/mame
synced 2025-04-28 03:02:52 +03:00
debug: fix a string overflow in comments
This commit is contained in:
parent
1417b6be30
commit
146393cf11
@ -420,7 +420,7 @@ bool debug_view_disasm::recompute(offs_t pc, int startline, int lines)
|
|||||||
offs_t comment_address = source.m_space.byte_to_address(m_byteaddress[instr]);
|
offs_t comment_address = source.m_space.byte_to_address(m_byteaddress[instr]);
|
||||||
const char *text = source.m_device.debug()->comment_text(comment_address);
|
const char *text = source.m_device.debug()->comment_text(comment_address);
|
||||||
if (text != NULL)
|
if (text != NULL)
|
||||||
sprintf(&destbuf[m_divider2], "// %.*s", row_width - m_divider2 - 1, text);
|
sprintf(&destbuf[m_divider2], "// %.*s", row_width - m_divider2 - 4, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
// see if the line changed at all
|
// see if the line changed at all
|
||||||
|
Loading…
Reference in New Issue
Block a user