Backport "bind showkeys" osdcmd crash fix from eduke32

This commit is contained in:
nukeykt 2019-09-30 14:47:49 +09:00 committed by Christoph Oelckers
parent ce61c38660
commit 0d2567a808
1 changed files with 2 additions and 2 deletions

View File

@ -500,8 +500,8 @@ static int osdcmd_bind(osdcmdptr_t parm)
char buffer[256];
if (parm->numparms==1 && !Bstrcasecmp(parm->parms[0],"showkeys"))
{
for (int i=0; sctokeylut[i].key; i++)
OSD_Printf("%s\n",sctokeylut[i].key);
for (auto & s : sctokeylut)
OSD_Printf("%s\n", s.key);
for (auto ConsoleButton : ConsoleButtons)
OSD_Printf("%s\n",ConsoleButton);
return OSDCMD_OK;