diff options
-rw-r--r-- | usr.bin/ssh/sftp-int.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/ssh/sftp-int.c b/usr.bin/ssh/sftp-int.c index 0971579a4b0..c238c2e09bf 100644 --- a/usr.bin/ssh/sftp-int.c +++ b/usr.bin/ssh/sftp-int.c @@ -25,7 +25,7 @@ /* XXX: recursive operations */ #include "includes.h" -RCSID("$OpenBSD: sftp-int.c,v 1.61 2003/07/19 00:45:53 djm Exp $"); +RCSID("$OpenBSD: sftp-int.c,v 1.62 2003/08/25 08:13:09 fgsch Exp $"); #include <glob.h> @@ -602,6 +602,7 @@ do_ls_dir(struct sftp_conn *conn, char *path, char *strip_path, int lflag) width = ws.ws_col; columns = width / (m + 2); + columns = MAX(columns, 1); colspace = width / columns; } @@ -688,6 +689,7 @@ do_globbed_ls(struct sftp_conn *conn, char *path, char *strip_path, width = ws.ws_col; columns = width / (m + 2); + columns = MAX(columns, 1); colspace = width / columns; } |