mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2024-11-23 08:50:52 +01:00
Potential fix
This commit is contained in:
parent
6a9b1201ac
commit
43c15fed3e
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user