From 8db5d5bef242d1486cf78dded8a5b44e069e944a Mon Sep 17 00:00:00 2001
From: Zach van Rijn <me@zv.io>
Date: Sun, 6 May 2018 17:49:27 -0400
Subject: Fix bug in 'xxd' causing incorrect translation for upper-case
 characters.

---
 toys/other/xxd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 }
 
-- 
cgit v1.2.3