mirror of
https://github.com/holub/mame
synced 2025-06-29 23:48:56 +03:00
osdcore: fix buffer overflow with osd_output stack
This commit is contained in:
parent
cee44b0414
commit
c6993affc6
@ -26,7 +26,7 @@ static int m_ptr = -1;
|
|||||||
|
|
||||||
void osd_output::push(osd_output *delegate)
|
void osd_output::push(osd_output *delegate)
|
||||||
{
|
{
|
||||||
if (m_ptr < MAXSTACK)
|
if (m_ptr < MAXSTACK - 1)
|
||||||
{
|
{
|
||||||
delegate->m_chain = (m_ptr >= 0 ? m_stack[m_ptr] : nullptr);
|
delegate->m_chain = (m_ptr >= 0 ? m_stack[m_ptr] : nullptr);
|
||||||
m_ptr++;
|
m_ptr++;
|
||||||
|
Loading…
Reference in New Issue
Block a user