You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Michel, first let me thank you enourmously for your efforts.
I'm basing my custom binary format on your approach and that saved me tons of investigations.
I've found/fixed small bug you may want to fix back in your code:
The text was updated successfully, but these errors were encountered:
neopaf
changed the title
UnsafeByteArrayInputStream.read for bytes >= 0x80 does not advance pos
UnsafeByteArrayInputStream.read for bytes >= 0x80 returns negative integer, caller thinks "Oh, EOF"
Mar 13, 2020
Thanks. This looks really interesting. Can you provide sample data that causes the issue? If possible, can you also write a unit test that demonstrates the problem so that we can cover against regressions in the future? Thanks.
Michel, first let me thank you enourmously for your efforts.
I'm basing my custom binary format on your approach and that saved me tons of investigations.
I've found/fixed small bug you may want to fix back in your code:
before
Here, when buffer contains byte with sign bit on this code returns negative integer.
CountingInputStream.read caller assumes EOF situation, while there are more bytes available.
Premature EOF causes stops further parsing of input buffer past 0x80 (or higher) byte.
suggest this
The text was updated successfully, but these errors were encountered: