mirror of
https://github.com/rkd77/elinks.git
synced 2025-06-30 22:19:29 -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;
|
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;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user