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

Meaningless checks and always true conditional statements. #136

Open
uramnoil opened this issue Dec 8, 2020 · 1 comment
Open

Meaningless checks and always true conditional statements. #136

uramnoil opened this issue Dec 8, 2020 · 1 comment

Comments

@uramnoil
Copy link

uramnoil commented Dec 8, 2020

https://github.com/JRakNet/JRakNet/blob/707e9b60a69b548d521e535ab75b791f443265b9/src/main/java/com/whirvis/jraknet/Packet.java#L1112

The maximum value of type Int is 0x7FFFFF; 0xFFFFFFL is out of range.

https://github.com/JRakNet/JRakNet/blob/707e9b60a69b548d521e535ab75b791f443265b9/src/main/java/com/whirvis/jraknet/Packet.java#L1160

This conditional statement always returns true; 0xFFFFFFFFFFFFFFFFFFFFFFFL represents -1.

@uramnoil uramnoil changed the title 意味のないチェックと常にtrueな条件文 Meaningless checks and always true conditional statements. Dec 8, 2020
@whirvis
Copy link
Owner

whirvis commented Dec 17, 2020

Thank you once again! 👍

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

2 participants