mirror of
https://github.com/reactos/reactos.git
synced 2026-07-01 03:24:29 +08:00
incorporated changes from Boudewijn
svn path=/trunk/; revision=207
This commit is contained in:
@@ -23,7 +23,7 @@ int
|
||||
_getch(void)
|
||||
{
|
||||
|
||||
DWORD NumberOfCharsRead;
|
||||
DWORD NumberOfCharsRead = 0;
|
||||
char c;
|
||||
if (char_avail)
|
||||
{
|
||||
@@ -31,12 +31,12 @@ _getch(void)
|
||||
char_avail = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
ReadConsoleA(filehnd(stdin->_file), &c,1,&NumberOfCharsRead ,NULL);
|
||||
|
||||
if( !ReadFile(filehnd(stdin->_file), &c,1,&NumberOfCharsRead ,NULL))
|
||||
return -1;
|
||||
|
||||
}
|
||||
printk("%c",c);
|
||||
if ( c == 10 )
|
||||
c = 13;
|
||||
putchar(c);
|
||||
return c;
|
||||
}
|
||||
Reference in New Issue
Block a user