aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
Diffstat (limited to 'libbb')
-rw-r--r--libbb/get_terminal_width_height.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/get_terminal_width_height.c b/libbb/get_terminal_width_height.c
index ef90463fb..7a1af6dc1 100644
--- a/libbb/get_terminal_width_height.c
+++ b/libbb/get_terminal_width_height.c
@@ -36,7 +36,7 @@ void get_terminal_width_height(int fd, int *width, int *height)
{
struct winsize win = { 0, 0, 0, 0 };
#ifdef CONFIG_FEATURE_AUTOWIDTH
- if (ioctl(0, TIOCGWINSZ, &win) != 0) {
+ if (ioctl(fd, TIOCGWINSZ, &win) != 0) {
win.ws_row = 24;
win.ws_col = 80;
}