From cd110f537b3ecbac4e7d8c714e27cb7acb65bf22 Mon Sep 17 00:00:00 2001 From: Pierre Maurice Schwang Date: Tue, 11 Jun 2024 21:33:47 +0200 Subject: [PATCH] chore: replace while loop with simple if as char can be max 2 bytes --- .../core/extent/clipboard/io/FastSchematicWriterV3.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/io/FastSchematicWriterV3.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/io/FastSchematicWriterV3.java index 581ba9dfb..0050b4dd6 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/io/FastSchematicWriterV3.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/clipboard/io/FastSchematicWriterV3.java @@ -242,7 +242,7 @@ public class FastSchematicWriterV3 implements ClipboardWriter { } out.writeNamedTag(paletteEntryResolver.apply(obj), value); } - while ((value & -128) != 0) { + if ((value & -128) != 0) { dataBytesUsed++; dataOut.write(value & 127 | 128); value >>>= 7;