mirror of
https://github.com/holub/mame
synced 2025-06-30 16:00:01 +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)
|
||||
{
|
||||
if (m_ptr < MAXSTACK)
|
||||
if (m_ptr < MAXSTACK - 1)
|
||||
{
|
||||
delegate->m_chain = (m_ptr >= 0 ? m_stack[m_ptr] : nullptr);
|
||||
m_ptr++;
|
||||
|
Loading…
Reference in New Issue
Block a user