hopeful it is last bug in choice.c when you type choice "sadsa" it did not response on key press at all.

svn path=/trunk/; revision=16457
This commit is contained in:
Magnus Olsen 2005-07-06 14:06:33 +00:00
parent 1369d1649e
commit c9b36033d8

View file

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