1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-28 03:06:20 -04:00

[terminal] use fd not 1 for ioctl

This commit is contained in:
Witold Filipczyk 2023-12-06 08:21:29 +01:00
parent b580d78ba3
commit e538a9f827

View File

@ -220,7 +220,7 @@ get_terminal_size(int fd, int *x, int *y, int *cw, int *ch)
{ {
struct winsize ws; struct winsize ws;
if (ioctl(1, TIOCGWINSZ, &ws) != -1) { if (ioctl(fd, TIOCGWINSZ, &ws) != -1) {
*x = ws.ws_col; *x = ws.ws_col;
*y = ws.ws_row; *y = ws.ws_row;