1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-25 01:05:37 +00: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;
if (ioctl(1, TIOCGWINSZ, &ws) != -1) {
if (ioctl(fd, TIOCGWINSZ, &ws) != -1) {
*x = ws.ws_col;
*y = ws.ws_row;