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

Better handle auto type conversions #8

Open
liach opened this issue Apr 3, 2021 · 0 comments
Open

Better handle auto type conversions #8

liach opened this issue Apr 3, 2021 · 0 comments

Comments

@liach
Copy link

liach commented Apr 3, 2021

Sometimes, some constants would be stored as a narrower type and be used as a wider type downstream:
For example:
In the game state change s2c packet, a few values for demo states are stored as integers but always read as floats.
In the packet byte buf, the max nbt size is an int but passed to a ctor that takes longs; the default max string length is a short but the length accepts an int.

Currently, a workaround is to specify a descriptor and a value. However, the problem with that is unpick seems to generate wrong getstatic opcodes with wrong descriptors (than use instruction like i2f), because what i see in decompiler is unresolved field references.

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