aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-03-18 17:56:43 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-03-18 17:56:43 +0000
commite3d83aafb40ba31369d41e456c06e929252de2e1 (patch)
treea32c95ebf0810b37458b82d17757cb88d4b5e7fa
parentbbbb7e02fcd116390eaa86d701b674ca3f3312f6 (diff)
downloadbusybox-w32-e3d83aafb40ba31369d41e456c06e929252de2e1.tar.gz
busybox-w32-e3d83aafb40ba31369d41e456c06e929252de2e1.tar.bz2
busybox-w32-e3d83aafb40ba31369d41e456c06e929252de2e1.zip
fix erroneous lowercasing by bb_hexdigits_upcase[i] | 0x10
-rw-r--r--include/libbb.h2
-rw-r--r--libbb/xfuncs.c4
2 files changed, 3 insertions, 3 deletions
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[];
690extern const char bb_msg_standard_output[]; 690extern const char bb_msg_standard_output[];
691 691
692extern const char bb_str_default[]; 692extern const char bb_str_default[];
693/* NB: (bb_hexdigits_upcase[i] | 0x10) -> lowercase hex digit */ 693/* NB: (bb_hexdigits_upcase[i] | 0x20) -> lowercase hex digit */
694extern const char bb_hexdigits_upcase[]; 694extern const char bb_hexdigits_upcase[];
695 695
696extern const char bb_path_mtab_file[]; 696extern 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)
340 while (count) { 340 while (count) {
341 unsigned char c = *cp++; 341 unsigned char c = *cp++;
342 /* put lowercase hex digits */ 342 /* put lowercase hex digits */
343 *p++ = 0x10 | bb_hexdigits_upcase[c >> 4]; 343 *p++ = 0x20 | bb_hexdigits_upcase[c >> 4];
344 *p++ = 0x10 | bb_hexdigits_upcase[c & 0xf]; 344 *p++ = 0x20 | bb_hexdigits_upcase[c & 0xf];
345 count--; 345 count--;
346 } 346 }
347 return p; 347 return p;