changeset 853:357b31ae2f04

uuencode tweak: output a non-whitespace character for 0 in traditional mode.
author Rob Landley <rob@landley.net>
date Thu, 11 Apr 2013 20:44:27 -0500
parents 6be04ec7b7ac
children 68cdd244f8b1
files toys/posix/uuencode.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/toys/posix/uuencode.c	Thu Apr 11 17:32:01 2013 -0500
+++ b/toys/posix/uuencode.c	Thu Apr 11 20:44:27 2013 -0500
@@ -58,7 +58,7 @@
 
         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');