aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2018-05-06 17:49:27 -0400
committerRob Landley <rob@landley.net>2018-05-06 22:48:33 -0500
commit8db5d5bef242d1486cf78dded8a5b44e069e944a (patch)
tree6850a9c75df5c5d27d30474760e330e494a8e405 /toys
parenteee28e7b5851a6eb16f7969393d8c6292b1f8754 (diff)
downloadtoybox-8db5d5bef242d1486cf78dded8a5b44e069e944a.tar.gz
Fix bug in 'xxd' causing incorrect translation for upper-case characters.
Diffstat (limited to 'toys')
-rw-r--r--toys/other/xxd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/other/xxd.c b/toys/other/xxd.c
index 6203d7aa..80892fb5 100644
--- a/toys/other/xxd.c
+++ b/toys/other/xxd.c
@@ -103,7 +103,7 @@ static int dehex(char ch)
{
if (ch >= '0' && ch <= '9') return ch - '0';
if (ch >= 'a' && ch <= 'f') return ch - 'a' + 10;
- if (ch >= 'A' && ch <= 'F') return ch - 'a' + 10;
+ if (ch >= 'A' && ch <= 'F') return ch - 'A' + 10;
return (ch == '\n') ? -2 : -1;
}