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

Strings with the literal values "true" and "false" are mistaken with bytes when written and parsed from SNBT. #63

Open
Igrium opened this issue Jun 30, 2021 · 1 comment

Comments

@Igrium
Copy link

Igrium commented Jun 30, 2021

If you have a string tag with the value "true" or "false" and you write it to SNBT, it's read as a byte when parsed again. This is problematic when trying to manipulate gamerules using SNBT.
Potential fix is to check if a string matches "true" or "false" when writing to SNBT and surround it with quotes if it does.

@DalekCraft2
Copy link

Bumping this, because I also experience this. At the moment, I have to use a custom static method to convert bytes into strings, but it would be safer if the issue was fixed at the source.

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