aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 d2da056f7..8b9842344 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -739,7 +739,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 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;