mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
Fix DataConverter ConverterParticleToNBT.parseProperties
- The old code was using `StringReader.peek()` in a place where it meant to be `StringReader.skip()`. - The vanilla code allows a trailing comma, but only if there is no whitespace between it and the closing bracket, which is a bit weird. I think that's a bug and it shouldn't allow trailing commas, but if you disagree then only the first issue needs to be fixed.
This commit is contained in:
parent
79fcb6baf4
commit
67b30c5ed5
1 changed files with 22 additions and 20 deletions
|
@ -7970,9 +7970,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ reader.expect('[');
|
+ reader.expect('[');
|
||||||
+ reader.skipWhitespace();
|
+ reader.skipWhitespace();
|
||||||
+
|
+
|
||||||
+ while (reader.canRead() && reader.peek() != ']') {
|
+ if (reader.canRead() && reader.peek() != ']') {
|
||||||
+ reader.skipWhitespace();
|
+ while (reader.canRead()) {
|
||||||
+
|
|
||||||
+ final String property = reader.readString();
|
+ final String property = reader.readString();
|
||||||
+
|
+
|
||||||
+ reader.skipWhitespace();
|
+ reader.skipWhitespace();
|
||||||
|
@ -7990,7 +7989,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ // skip ',' and move onto next entry
|
+ // skip ',' and move onto next entry
|
||||||
+ reader.peek();
|
+ reader.skip();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ reader.skipWhitespace();
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
|
Loading…
Reference in a new issue