diff --git a/reactos/subsys/system/cmd/choice.c b/reactos/subsys/system/cmd/choice.c index 45705ce4d8c..4a01855b847 100644 --- a/reactos/subsys/system/cmd/choice.c +++ b/reactos/subsys/system/cmd/choice.c @@ -105,7 +105,7 @@ CommandChoice (LPTSTR cmd, LPTSTR param) { TCHAR szMsg[RC_STRING_MAX_SIZE]; LPTSTR lpOptions; - TCHAR Options[4]; + TCHAR Options[6]; LPTSTR lpText = NULL; BOOL bNoPrompt = FALSE; BOOL bCaseSensitive = FALSE; @@ -240,16 +240,26 @@ CommandChoice (LPTSTR cmd, LPTSTR param) { ConInKey (&ir); + if (bNoPrompt != FALSE) + { val = IsKeyInString (lpOptions, #ifdef _UNICODE ir.Event.KeyEvent.uChar.UnicodeChar, #else ir.Event.KeyEvent.uChar.AsciiChar, -#endif /* _UNICODE */ +#endif bCaseSensitive); + } + else + { + + val = IsKeyInString (lpOptions, + ir.Event.KeyEvent.uChar.UnicodeChar, + bCaseSensitive); + } if (val >= 0) - { + { ConOutPrintf (_T("%c\n"), lpOptions[val]); nErrorLevel = val + 1;