fix buffer underrun

git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@8043 30fe4595-0a0c-4342-8851-515496e4dcbd

Former-commit-id: da0331c7b96b397e034f114b829741d08c3408a2
Former-commit-id: ce5fa23dd2d294dae2aee7e858762c858c9b7f2a
This commit is contained in:
iobyte 2022-02-18 01:27:47 +00:00
parent d13e1ea52a
commit a33aced8da

View file

@ -183,7 +183,7 @@ Idle2(void)
for (index = 0; index < GFCTRL_JOY_NUMBER * GFCTRL_JOY_MAX_BUTTONS; index++) { for (index = 0; index < GFCTRL_JOY_NUMBER * GFCTRL_JOY_MAX_BUTTONS; index++) {
if (joyInfo.edgedn[index]) { if (joyInfo.edgedn[index]) {
/* Check whether to ignore */ /* Check whether to ignore */
if(Cmd[CalState + CmdOffset].butIgnore == index) if(CalState && Cmd[CalState + CmdOffset].butIgnore == index)
break; break;
/* Button fired */ /* Button fired */