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

core is producing the wrong code by not including a cast #45

Open
jlholt opened this issue Jun 5, 2020 · 0 comments
Open

core is producing the wrong code by not including a cast #45

jlholt opened this issue Jun 5, 2020 · 0 comments

Comments

@jlholt
Copy link

jlholt commented Jun 5, 2020

I'm using JD-GUI 1.6.6.

I compile the following code with Java 1.8.

public static long l (int x, int y) {
long rc = ( (long)y << 32L) | x;
return rc;
}

But when I view the decompiled output, I see this:

public static long l(int x, int y) {
long rc = y << 32L | x;
return rc;
}

Given: x=1, y=2

When I execute the compiled source, I get a return code of 8589934593.

When I compile and execute the source from the decompiled class file, I get a return code of 3.

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

1 participant