Skip to content
This repository has been archived by the owner on Sep 21, 2020. It is now read-only.

StreamUtil's readLen16 misses one byte #4

Closed
sorccu opened this issue Mar 25, 2014 · 2 comments
Closed

StreamUtil's readLen16 misses one byte #4

sorccu opened this issue Mar 25, 2014 · 2 comments
Assignees
Labels

Comments

@sorccu
Copy link
Contributor

sorccu commented Mar 25, 2014

StreamUtil's readLen16 is supposed to read a length composed of one or two unsigned shorts, as this comment in the source also mentions. However, it seems to be reading an signed short and then an unsigned byte, therefore missing one byte. The problem is slightly masked by the byte ordering, causing it to work unless you have very large values.

@hsiafan
Copy link
Owner

hsiafan commented Mar 26, 2014

confirmed

@hsiafan hsiafan added the bug label Mar 26, 2014
@hsiafan hsiafan self-assigned this Mar 26, 2014
@hsiafan
Copy link
Owner

hsiafan commented Mar 26, 2014

fixed in 1.0.1

@hsiafan hsiafan closed this as completed Mar 26, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants