mike-mcgann commented on code in PR #926:
URL: https://github.com/apache/daffodil/pull/926#discussion_r1084133733


##########
daffodil-runtime1/src/main/scala/org/apache/daffodil/dpath/XSHexBinary.scala:
##########
@@ -67,7 +67,7 @@ trait HexBinaryKind {
       case bi: JBigInt if (bi.bitLength <= 63) => reduce(bi.longValue())
       case bi: JBigInt => bi.toByteArray()
       case bd: JBigDecimal if (try { bd.toBigIntegerExact(); true } catch { 
case e: ArithmeticException => false }) => reduce(bd.toBigIntegerExact())
-      case str: String => reduce(new JBigInt(str))
+      case str: String => reduce(new JBigInt(str, 16))

Review Comment:
   Updated to use `Misc.hex2Bytes` and this is actually more correct since it 
enforces the string to have an even number of digits. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to