From e2fb6d14de683c06325b1667df3370839cb3815d Mon Sep 17 00:00:00 2001 From: syeyoung Date: Mon, 9 Aug 2021 00:59:20 +0900 Subject: - Party Invite Viewer now scales pfp correctly, and supports invite to join --- src/main/java/kr/syeyoung/dungeonsguide/gamesdk/GameSDK.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main/java/kr/syeyoung/dungeonsguide/gamesdk') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/GameSDK.java b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/GameSDK.java index 0f591f22..ee4dd1f8 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/GameSDK.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/gamesdk/GameSDK.java @@ -83,11 +83,12 @@ public class GameSDK { public static void writeString(byte[] bts, String str) { System.arraycopy(str.getBytes(), 0, bts, 0, str.getBytes().length); + bts[str.getBytes().length] = 0; } public static String readString(byte[] bts) { int i; for (i = 0; i < bts.length && bts[i] != 0; i++); - byte[] asdasd = new byte[i+1]; + byte[] asdasd = new byte[i]; System.arraycopy(bts, 0, asdasd, 0, i); return new String(asdasd); } -- cgit