Skip to content

Commit

Permalink
unix/modtermios: Fix output speed setter in tcsetattr.
Browse files Browse the repository at this point in the history
The input speed was being set twice and the output speed was not set.
  • Loading branch information
laurensvalk authored and dpgeorge committed Nov 21, 2019
1 parent 334ba01 commit 2679c9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ports/unix/modtermios.c
Expand Up @@ -96,7 +96,7 @@ STATIC mp_obj_t mod_termios_tcsetattr(mp_obj_t fd_in, mp_obj_t when_in, mp_obj_t

int res = cfsetispeed(&term, mp_obj_get_int(attrs->items[4]));
RAISE_ERRNO(res, errno);
res = cfsetispeed(&term, mp_obj_get_int(attrs->items[5]));
res = cfsetospeed(&term, mp_obj_get_int(attrs->items[5]));
RAISE_ERRNO(res, errno);

res = tcsetattr(fd, when, &term);
Expand Down

0 comments on commit 2679c9e

Please sign in to comment.