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


##########
daffodil-runtime1/src/main/scala/org/apache/daffodil/runtime1/processors/parsers/BlobLengthParsers.scala:
##########
@@ -55,9 +55,9 @@ trait ByteChunkWriter { self: PrimParser =>
         remainingBitsToGet -= bitsToGet
       } else {
         val remainingBits =
-          if (dis.remainingBits.isDefined) {
+          if (dis.remainingLimitedBits.isDefined) {
             val totalBitsRead = nBits - remainingBitsToGet
-            MaybeULong(dis.remainingBits.get + totalBitsRead)
+            MaybeULong(dis.remainingLimitedBits.get + totalBitsRead)

Review Comment:
   I renamed `bytesAvailable` to `knownBytesAvailable` to help indicate that 
this is not necessarily a known value and should not be relied on in parsing 
situations. The `remainingBits`/`remainingLimitBits` have been refactored out 
and that logic is now in the error reporting function. 



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