aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2013-04-11 20:44:27 -0500
committerRob Landley <rob@landley.net>2013-04-11 20:44:27 -0500
commitff8b9ed551bdf942d20553ec6f0b687ba04e0ed9 (patch)
treedf941de1202337bc7c14d5c5ce5bf6f96b7205db /toys
parentdb40cf0cb2c830366025ce9be4dfed94270f863e (diff)
downloadtoybox-ff8b9ed551bdf942d20553ec6f0b687ba04e0ed9.tar.gz
uuencode tweak: output a non-whitespace character for 0 in traditional mode.
Diffstat (limited to 'toys')
-rw-r--r--toys/posix/uuencode.c2
1 files changed, 1 insertions, 1 deletions
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');