msvcrt: Fix console detection in _write.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
305aaec877
commit
155e2b2c3e
|
@ -3447,7 +3447,7 @@ int CDECL MSVCRT__write(int fd, const void* buf, unsigned int count)
|
||||||
ioinfo *info = get_ioinfo(fd);
|
ioinfo *info = get_ioinfo(fd);
|
||||||
HANDLE hand = info->handle;
|
HANDLE hand = info->handle;
|
||||||
DWORD num_written, i;
|
DWORD num_written, i;
|
||||||
BOOL console;
|
BOOL console = FALSE;
|
||||||
|
|
||||||
if (hand == INVALID_HANDLE_VALUE || fd == MSVCRT_NO_CONSOLE_FD)
|
if (hand == INVALID_HANDLE_VALUE || fd == MSVCRT_NO_CONSOLE_FD)
|
||||||
{
|
{
|
||||||
|
@ -3482,7 +3482,7 @@ int CDECL MSVCRT__write(int fd, const void* buf, unsigned int count)
|
||||||
return num_written;
|
return num_written;
|
||||||
}
|
}
|
||||||
|
|
||||||
console = MSVCRT__isatty(fd);
|
if (MSVCRT__isatty(fd)) console = VerifyConsoleIoHandle(hand);
|
||||||
for (i = 0; i < count;)
|
for (i = 0; i < count;)
|
||||||
{
|
{
|
||||||
const char *s = buf;
|
const char *s = buf;
|
||||||
|
|
Loading…
Reference in New Issue