Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java conformance code will fail when reading more than 256 bytes #685

Closed
jskeet opened this issue Aug 4, 2015 · 1 comment
Closed

Java conformance code will fail when reading more than 256 bytes #685

jskeet opened this issue Aug 4, 2015 · 1 comment
Assignees

Comments

@jskeet
Copy link
Contributor

jskeet commented Aug 4, 2015

Drive-by issue rather than fix as I'm in the middle of implementing it for C#, but in ConformanceJava.java:

 return buf[0] | (buf[1] << 1) | (buf[2] << 2) | (buf[3] << 3);

should be:

 return buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24);

... quite possibly with some bit masking given the signed-byte nature of Java.

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Jan 21, 2016

Fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants