aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-02-10 16:23:31 -0600
committerRob Landley <rob@landley.net>2016-02-10 16:26:25 -0600
commit93e27d0d4723d57082463c4d70e6443060a8732b (patch)
treedf07641cf274454fee5f2cfcef1cf760b6eb92d6
parent1e77f70a1d94a345892ddf88f9e46de1c5c91a48 (diff)
downloadtoybox-93e27d0d4723d57082463c4d70e6443060a8732b.tar.gz
Although printf("%.*s", INT_MAX, s) works fine on ubuntu 12.04, it broke since.
-rw-r--r--toys/posix/grep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/grep.c b/toys/posix/grep.c
index d02dd9eb..c5d626aa 100644
--- a/toys/posix/grep.c
+++ b/toys/posix/grep.c
@@ -74,7 +74,7 @@ static void outline(char *line, char dash, char *name, long lcount, long bcount,
if (!line || (lcount && (toys.optflags&FLAG_n)))
printf("%ld%c", lcount, line ? dash : TT.outdelim);
if (bcount && (toys.optflags&FLAG_b)) printf("%ld%c", bcount-1, dash);
- if (line) xprintf("%.*s%c", trim ? trim : INT_MAX, line, TT.outdelim);
+ if (line) xprintf("%.*s%c", trim ? trim : INT_MAX/2, line, TT.outdelim);
}
// Show matches in one file