diff options
author | Zach van Rijn <me@zv.io> | 2018-05-06 17:49:27 -0400 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2018-05-06 22:48:33 -0500 |
commit | 8db5d5bef242d1486cf78dded8a5b44e069e944a (patch) | |
tree | 6850a9c75df5c5d27d30474760e330e494a8e405 /toys/other | |
parent | eee28e7b5851a6eb16f7969393d8c6292b1f8754 (diff) | |
download | toybox-8db5d5bef242d1486cf78dded8a5b44e069e944a.tar.gz |
Fix bug in 'xxd' causing incorrect translation for upper-case characters.
Diffstat (limited to 'toys/other')
-rw-r--r-- | toys/other/xxd.c | 2 |
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; } |