String UTF_16LE byte size is double of character size.

This commit is contained in:
MobiusDevelopment
2023-02-17 13:10:07 +02:00
parent 2e365a7063
commit 68f3055f23
26 changed files with 26 additions and 26 deletions

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {

View File

@@ -56,7 +56,7 @@ public class ReadablePacket
String result = ""; String result = "";
try try
{ {
result = new String(readBytes(readShort()), StandardCharsets.UTF_16LE); result = new String(readBytes(readShort() * 2), StandardCharsets.UTF_16LE);
} }
catch (Exception ignored) catch (Exception ignored)
{ {