From ff8b9ed551bdf942d20553ec6f0b687ba04e0ed9 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 11 Apr 2013 20:44:27 -0500 Subject: uuencode tweak: output a non-whitespace character for 0 in traditional mode. --- toys/posix/uuencode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys') diff --git a/toys/posix/uuencode.c b/toys/posix/uuencode.c index 78d199a9..2323c98d 100644 --- a/toys/posix/uuencode.c +++ b/toys/posix/uuencode.c @@ -58,7 +58,7 @@ void uuencode_main(void) if (j < bytes) x |= (*(in++) & 0x0ff) << (8*(2-j)); out = (x>>((3-j)*6)) & 0x3f; - xputc(m ? j > bytes ? '=' : toybuf[out] : out + 0x20); + xputc(m ? (j > bytes ? '=' : toybuf[out]) : (out ? out + 0x20 : 0x60)); } } xputc('\n'); -- cgit v1.2.3