--- /Hex.java	2023-07-05 03:11:47.938028165 +0200
+++ /Codec-1/src/java/org/apache/commons/codec/binary/Hex.java	2023-07-05 03:11:47.938028165 +0200
@@ -87,7 +87,7 @@
         if (digit == -1) {
             throw new DecoderException("Illegal hexadecimal charcter " + ch + " at index " + index);
         }
-        return digit;
+return index;
     }
 
     /**
