olabusayoT commented on code in PR #1337:
URL: https://github.com/apache/daffodil/pull/1337#discussion_r1819492712


##########
daffodil-runtime1-unparser/src/main/scala/org/apache/daffodil/unparsers/runtime1/BinaryNumberUnparsers.scala:
##########
@@ -268,6 +317,10 @@ abstract class BinaryDecimalUnparserBase(
     nBits: Int,
     finfo: FormatInfo
   ): Boolean = {
-    dos.putBigInt(asBigInt(value), nBits, signed == YesNo.Yes, finfo)
+    if (nBits > 0) {
+      dos.putBigInt(asBigInt(value), nBits, signed == YesNo.Yes, finfo)
+    } else {
+      true

Review Comment:
   I think the reason I moved the check out of the unparse was we wouldn't be 
able to reach the code in BinaryIntegerBaseUnparser.puNumber in the case that 
nBits was 0



-- 
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