Skip to content

Commit 75f3fb9

Browse files
Use String constructor that implements the logic we want
1 parent f287fcc commit 75f3fb9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/pw/kaboom/extras/modules/player/PlayerMessaging.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ private static String readString(DataInput dataInput) throws IOException {
7474
if (isLast) break;
7575
}
7676

77-
return new String(Arrays.copyOf(buf, idx), StandardCharsets.US_ASCII);
77+
return new String(buf, 0, idx, StandardCharsets.US_ASCII);
7878
}
7979

8080
private void handleRegister(final Player player, final DataInput input) throws IOException {

0 commit comments

Comments
 (0)