From 93e27d0d4723d57082463c4d70e6443060a8732b Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 10 Feb 2016 16:23:31 -0600 Subject: Although printf("%.*s", INT_MAX, s) works fine on ubuntu 12.04, it broke since. --- toys/posix/grep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3