aboutsummaryrefslogtreecommitdiff
path: root/toys/posix
diff options
context:
space:
mode:
Diffstat (limited to 'toys/posix')
-rw-r--r--toys/posix/ls.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/toys/posix/ls.c b/toys/posix/ls.c
index cd881b05..5982adfe 100644
--- a/toys/posix/ls.c
+++ b/toys/posix/ls.c
@@ -425,6 +425,7 @@ void ls_main(void)
else {
TT.screen_width = 80;
terminal_size(&TT.screen_width, NULL);
+ if (TT.screen_width<2) TT.screen_width = 2;
if (!(toys.optflags&(FLAG_1|FLAG_x|FLAG_m))) toys.optflags |= FLAG_C;
}
// The optflags parsing infrastructure should really do this for us,