M_DrawPause: fix iterating beyond bounds of menuitems

This commit is contained in:
James R 2023-04-04 22:01:42 -07:00
parent 91a6bcf8be
commit a469cebef7

View file

@ -4011,7 +4011,7 @@ void M_DrawPause(void)
i++; // Regardless of whether we drew or not, go to the next item in the menu.
if (i > currentMenu->numitems)
if (i >= currentMenu->numitems)
{
i = 0;
while (!(currentMenu->menuitems[i].status & IT_DISPLAY))