diff options
Diffstat (limited to 'sftp-int.c')
-rw-r--r-- | sftp-int.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sftp-int.c b/sftp-int.c index 73653b7e0..94299aa43 100644 --- a/sftp-int.c +++ b/sftp-int.c | |||
@@ -25,7 +25,7 @@ | |||
25 | /* XXX: recursive operations */ | 25 | /* XXX: recursive operations */ |
26 | 26 | ||
27 | #include "includes.h" | 27 | #include "includes.h" |
28 | RCSID("$OpenBSD: sftp-int.c,v 1.61 2003/07/19 00:45:53 djm Exp $"); | 28 | RCSID("$OpenBSD: sftp-int.c,v 1.62 2003/08/25 08:13:09 fgsch Exp $"); |
29 | 29 | ||
30 | #include "buffer.h" | 30 | #include "buffer.h" |
31 | #include "xmalloc.h" | 31 | #include "xmalloc.h" |
@@ -600,6 +600,7 @@ do_ls_dir(struct sftp_conn *conn, char *path, char *strip_path, int lflag) | |||
600 | width = ws.ws_col; | 600 | width = ws.ws_col; |
601 | 601 | ||
602 | columns = width / (m + 2); | 602 | columns = width / (m + 2); |
603 | columns = MAX(columns, 1); | ||
603 | colspace = width / columns; | 604 | colspace = width / columns; |
604 | } | 605 | } |
605 | 606 | ||
@@ -686,6 +687,7 @@ do_globbed_ls(struct sftp_conn *conn, char *path, char *strip_path, | |||
686 | width = ws.ws_col; | 687 | width = ws.ws_col; |
687 | 688 | ||
688 | columns = width / (m + 2); | 689 | columns = width / (m + 2); |
690 | columns = MAX(columns, 1); | ||
689 | colspace = width / columns; | 691 | colspace = width / columns; |
690 | } | 692 | } |
691 | 693 | ||