From: Denis Vlasenko Date: Sun, 18 Mar 2007 17:56:43 +0000 (-0000) Subject: fix erroneous lowercasing by bb_hexdigits_upcase[i] | 0x10 X-Git-Tag: 1_4_2~5 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e3d83aafb40ba31369d41e456c06e929252de2e1;p=oweals%2Fbusybox.git fix erroneous lowercasing by bb_hexdigits_upcase[i] | 0x10 --- diff --git a/include/libbb.h b/include/libbb.h index 30d3006ad..8ad92263e 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -690,7 +690,7 @@ extern const char bb_msg_standard_input[]; extern const char bb_msg_standard_output[]; extern const char bb_str_default[]; -/* NB: (bb_hexdigits_upcase[i] | 0x10) -> lowercase hex digit */ +/* NB: (bb_hexdigits_upcase[i] | 0x20) -> lowercase hex digit */ extern const char bb_hexdigits_upcase[]; extern const char bb_path_mtab_file[]; diff --git a/libbb/xfuncs.c b/libbb/xfuncs.c index c059e41e0..ed356a3cc 100644 --- a/libbb/xfuncs.c +++ b/libbb/xfuncs.c @@ -340,8 +340,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;