From 6f5b891b7b815b192581c89116e60a8ed7eb5009 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 6 May 2009 17:16:33 +0000 Subject: * fhandler_console.cc (fhandler_console::ioctl): Properly treat TIOCLINUX argument as a char. * fhandler_tty.cc (fhandler_tty_slave::ioctl): Use coercion to properly set char value. --- winsup/cygwin/fhandler_tty.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'winsup/cygwin/fhandler_tty.cc') diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 3249309..994d356 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -1048,7 +1048,7 @@ fhandler_tty_slave::ioctl (unsigned int cmd, void *arg) get_ttyp ()->arg.value = val; SetEvent (ioctl_request_event); WaitForSingleObject (ioctl_done_event, INFINITE); - *(unsigned char *) arg = get_ttyp ()->arg.value & 0xFF; + *(unsigned char *) arg = (unsigned char) (get_ttyp ()->arg.value); } break; case KDGKBMETA: -- cgit v1.1