From 817f059d48cf3e7bee267efd69cded04284494b4 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 20 Oct 2016 15:29:10 -0500 Subject: Allow out and escout to be NULL in crunch_str() --- lib/linestack.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/linestack.c') diff --git a/lib/linestack.c b/lib/linestack.c index eef790b5..e717a9bb 100644 --- a/lib/linestack.c +++ b/lib/linestack.c @@ -106,7 +106,8 @@ int crunch_str(char **str, int width, FILE *out, char *escmore, } col = width-columns; if (col<1) break; - col = escout(out, col, wc); + if (escout) col = escout(out, col, wc); + else if (out) fwrite(end, bytes, 1, out); } *str = end; -- cgit v1.2.3