diff options
author | Rob Landley <rob@landley.net> | 2013-06-30 01:26:56 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2013-06-30 01:26:56 -0500 |
commit | 302d9d3e5138e950487dd22ab9e8b1d32a67456c (patch) | |
tree | b22d51c668cf75bfd9a0d3e7a909bb9905d56133 | |
parent | 7bb5221b1f943c53c9abb96f7a25ef922ae9972d (diff) | |
download | toybox-302d9d3e5138e950487dd22ab9e8b1d32a67456c.tar.gz |
Fix another segfault in ls -C when terminal size is 0x0.
-rw-r--r-- | toys/posix/ls.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); } } |