You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Attempting to parse an integer array fails with a SyntaxError if the array contains a negative number.
This effectively means that any SNBT containing a UUID fails as those are length 4 Integer Arrays and UUID format guarantees a negative number here.
A simple check to confirm:
StringNbt.Parse("{uuid:[I; 0, 0, 0, -1]}");
throws
System.Data.SyntaxErrorException: 'Syntax error at index 19: Invalid character '-' in integer array.'
The text was updated successfully, but these errors were encountered:
Well, that is an embarrassing oversight on my part, no clue how I let that happen....
I don't have the code on my current machine to test with, but the fix would likely also require and additional check to ensure the - is the first character, and not just anywhere within the string (e.g. -123 is valid, but 1-2-3- is not). Either way, it will be a trivial fix to implement, thank you for taking the time to report.
the fix would likely also require and additional check to ensure the - is the first character, and not just anywhere within the string
That's true! Good catch! Thanks to you for taking the time to develop this thing! (Like seriously, I think this is the only SNBT parser library for C#)
Title...
Attempting to parse an integer array fails with a SyntaxError if the array contains a negative number.
This effectively means that any SNBT containing a UUID fails as those are length 4 Integer Arrays and UUID format guarantees a negative number here.
A simple check to confirm:
throws
The text was updated successfully, but these errors were encountered: