Potential fix

This commit is contained in:
WiredSpast 2023-02-24 17:30:23 +01:00 committed by GitHub
parent 6a9b1201ac
commit 43c15fed3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -134,6 +134,10 @@ public class MacOsHabboClient extends HabboClient {
private static byte[] hexStringToByteArray(String s) { private static byte[] hexStringToByteArray(String s) {
int len = s.length(); int len = s.length();
if (len % 2 == 1) {
s = "0" + s;
len += 1;
}
byte[] data = new byte[len / 2]; byte[] data = new byte[len / 2];
for (int i = 0; i < len; i += 2) { for (int i = 0; i < len; i += 2) {
data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4) data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4)