mirror of https://github.com/FDOS/kernel.git
allow "0" in full-screen config menus and plug a few potential related
overflows. git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@765 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
272f86af3d
commit
42b55cd1ac
|
@ -1882,7 +1882,7 @@ STATIC VOID CfgMenu(BYTE * pLine)
|
|||
pLine = skipwh(pLine); /* skip more whitespaces... */
|
||||
|
||||
/* now I'm expecting a number here if this is a menu-choice line. */
|
||||
if (pLine[0]>='1' && pLine[0]<='9')
|
||||
if (pLine[0]>='0' && pLine[0]<='9')
|
||||
{
|
||||
int nIndex = pLine[0]-'0';
|
||||
|
||||
|
@ -1989,14 +1989,14 @@ RestartInput:
|
|||
}
|
||||
else if(key == 0x4800 && MenuColor != -1) /* arrow up */
|
||||
{
|
||||
if(MenuSelected>=0 && (Menus & (1 << (MenuSelected-1))) )
|
||||
if(MenuSelected>=1 && (Menus & (1 << (MenuSelected-1))) )
|
||||
{
|
||||
MenuSelected--;
|
||||
}
|
||||
}
|
||||
else if(key == 0x5000 && MenuColor != -1) /* arrow down */
|
||||
{
|
||||
if(MenuSelected<MENULINESMAX && (Menus & (1 << (MenuSelected+1))) )
|
||||
if(MenuSelected<MENULINESMAX-1 && (Menus & (1 << (MenuSelected+1))) )
|
||||
{
|
||||
MenuSelected++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue