ReadConsoleA: use ir as pointer to (req+1).

This commit is contained in:
Marcus Meissner 1999-06-27 15:40:18 +00:00 committed by Alexandre Julliard
parent 4c2a07705c
commit cd37906fce
1 changed files with 5 additions and 4 deletions

View File

@ -785,7 +785,7 @@ BOOL WINAPI ReadConsoleA( HANDLE hConsoleInput,
{
int charsread = 0;
LPSTR xbuf = (LPSTR)lpBuffer;
INPUT_RECORD ir;
LPINPUT_RECORD ir;
TRACE("(%d,%p,%ld,%p,%p)\n",
hConsoleInput,lpBuffer,nNumberOfCharsToRead,
@ -803,11 +803,12 @@ BOOL WINAPI ReadConsoleA( HANDLE hConsoleInput,
req->flush = 1;
if (server_call( REQ_READ_CONSOLE_INPUT )) return FALSE;
if (!req->read) break;
if (!ir.Event.KeyEvent.bKeyDown)
ir = (LPINPUT_RECORD)(req+1);
if (!ir->Event.KeyEvent.bKeyDown)
continue;
if (ir.EventType != KEY_EVENT)
if (ir->EventType != KEY_EVENT)
continue;
*xbuf++ = ir.Event.KeyEvent.uChar.AsciiChar;
*xbuf++ = ir->Event.KeyEvent.uChar.AsciiChar;
charsread++;
}
if (lpNumberOfCharsRead)