kernel32: Fixed regression with echoing input characters.

This commit is contained in:
Eric Pouech 2010-11-11 22:30:11 +01:00 committed by Alexandre Julliard
parent 934d6761f0
commit 7f043168c1
1 changed files with 3 additions and 2 deletions

View File

@ -156,7 +156,8 @@ static int get_console_bare_fd(HANDLE hin)
{
int fd;
if (wine_server_handle_to_fd(hin, 0, &fd, NULL) == STATUS_SUCCESS)
if (wine_server_handle_to_fd(wine_server_ptr_handle(console_handle_unmap(hin)),
0, &fd, NULL) == STATUS_SUCCESS)
return fd;
return -1;
}
@ -1587,7 +1588,7 @@ BOOL WINAPI ReadConsoleW(HANDLE hConsoleInput, LPVOID lpBuffer,
if (!GetConsoleMode(hConsoleInput, &mode))
return FALSE;
if ((fd == get_console_bare_fd(hConsoleInput)) == -1)
if ((fd = get_console_bare_fd(hConsoleInput)) != -1)
{
close(fd);
is_bare = TRUE;