From ef6f3e8e8d91b19da2c97005c0c8bda04158b54a Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 9 Jul 2016 10:00:04 +0200 Subject: [PATCH] win: return UV_EINVAL on bad uv_tty_mode mode arg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: https://github.com/libuv/libuv/issues/941 PR-URL: https://github.com/libuv/libuv/pull/942 Reviewed-By: Saúl Ibarra Corretgé --- src/win/tty.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/win/tty.c b/src/win/tty.c index 59a991c6a07..daa303f13e7 100644 --- a/src/win/tty.c +++ b/src/win/tty.c @@ -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)) {