From 302d9d3e5138e950487dd22ab9e8b1d32a67456c Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 30 Jun 2013 01:26:56 -0500 Subject: Fix another segfault in ls -C when terminal size is 0x0. --- toys/posix/ls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/posix') diff --git a/toys/posix/ls.c b/toys/posix/ls.c index caabe7df..2f066a72 100644 --- a/toys/posix/ls.c +++ b/toys/posix/ls.c @@ -375,7 +375,7 @@ static void listfiles(int dirfd, struct dirtree *indir) // Pad columns if (flags & (FLAG_C|FLAG_x)) { curcol = colsizes[curcol] - *len; - if (curcol >= 0) xprintf("%s", toybuf+255-curcol); + if (curcol < 255) xprintf("%s", toybuf+255-curcol); } } -- cgit v1.2.3