From 42b55cd1acd1ee212271d95f45ee698fef54c090 Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Sat, 31 Jan 2004 15:06:36 +0000 Subject: [PATCH] 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 --- kernel/config.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/config.c b/kernel/config.c index d46ca41..8eb1d31 100644 --- a/kernel/config.c +++ b/kernel/config.c @@ -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