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:
parent
b580d78ba3
commit
e538a9f827
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user