aboutsummaryrefslogtreecommitdiff
path: root/libbb/xfuncs.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-01-26 23:31:05 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-01-26 23:31:05 +0000
commit98c0bba09d326624740a120173dbd28fbed2da22 (patch)
tree1e1682b33073c2afd28d210b01c7179776146356 /libbb/xfuncs.c
parentfc7f92253ae1c4f050e5ea2322b53b0e81bf96be (diff)
downloadbusybox-98c0bba09d326624740a120173dbd28fbed2da22.tar.gz
fix bin2hex bug. lowercase = uppercase | 0x20, not | 0x10!
Diffstat (limited to 'libbb/xfuncs.c')
-rw-r--r--libbb/xfuncs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c
index f6b904f78..4d85b1181 100644
--- a/libbb/xfuncs.c
+++ b/libbb/xfuncs.c
@@ -343,8 +343,8 @@ char *bin2hex(char *p, const char *cp, int count)
while (count) {
unsigned char c = *cp++;
/* put lowercase hex digits */
- *p++ = 0x10 | bb_hexdigits_upcase[c >> 4];
- *p++ = 0x10 | bb_hexdigits_upcase[c & 0xf];
+ *p++ = 0x20 | bb_hexdigits_upcase[c >> 4];
+ *p++ = 0x20 | bb_hexdigits_upcase[c & 0xf];
count--;
}
return p;