win: return UV_EINVAL on bad uv_tty_mode mode arg
Fixes: https://github.com/libuv/libuv/issues/941 PR-URL: https://github.com/libuv/libuv/pull/942 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
This commit is contained in:
parent
ff0ae10496
commit
ef6f3e8e8d
@ -297,6 +297,8 @@ int uv_tty_set_mode(uv_tty_t* tty, uv_tty_mode_t mode) {
|
||||
break;
|
||||
case UV_TTY_MODE_IO:
|
||||
return UV_ENOTSUP;
|
||||
default:
|
||||
return UV_EINVAL;
|
||||
}
|
||||
|
||||
if (!SetConsoleMode(tty->handle, flags)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user