Skip to content

Commit

Permalink
win: return UV_EINVAL on bad uv_tty_mode mode arg
Browse files Browse the repository at this point in the history
Fixes: libuv#941
PR-URL: libuv#942
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
  • Loading branch information
bnoordhuis committed Jul 30, 2016
1 parent ff0ae10 commit ef6f3e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/win/tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit ef6f3e8

Please sign in to comment.