diff options
author | Rob Landley <rob@landley.net> | 2016-10-20 15:29:10 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2016-10-20 15:29:10 -0500 |
commit | 817f059d48cf3e7bee267efd69cded04284494b4 (patch) | |
tree | f0eaf357ef9293528bd300fa1fefa77dc0cf0cfd /lib/linestack.c | |
parent | 3214c87ccf7f4a3426fe0d30296af1af85fc864e (diff) | |
download | toybox-817f059d48cf3e7bee267efd69cded04284494b4.tar.gz |
Allow out and escout to be NULL in crunch_str()
Diffstat (limited to 'lib/linestack.c')
-rw-r--r-- | lib/linestack.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |