Skip to content

Commit

Permalink
[terminal] use fd not 1 for ioctl
Browse files Browse the repository at this point in the history
  • Loading branch information
rkd77 committed Dec 6, 2023
1 parent b580d78 commit e538a9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/osdep/osdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ get_terminal_size(int fd, int *x, int *y, int *cw, int *ch)
{
struct winsize ws;

if (ioctl(1, TIOCGWINSZ, &ws) != -1) {
if (ioctl(fd, TIOCGWINSZ, &ws) != -1) {
*x = ws.ws_col;
*y = ws.ws_row;

Expand Down

0 comments on commit e538a9f

Please sign in to comment.