Changed random Client ID to the same as official Moonlight

This commit is contained in:
KiralyCraft
2020-10-01 14:42:14 +03:00
committed by Iwan Timmer
parent 5b6639c8a7
commit 338063fc2c

View File

@@ -87,11 +87,8 @@ static int load_unique_id(const char* keyDirectory) {
FILE *fd = fopen(uniqueFilePath, "r"); FILE *fd = fopen(uniqueFilePath, "r");
if (fd == NULL) { if (fd == NULL) {
unsigned char unique_data[UNIQUEID_BYTES]; snprintf(unique_id,UNIQUEID_CHARS+1,"0123456789ABCDEF");
RAND_bytes(unique_data, UNIQUEID_BYTES);
for (int i = 0; i < UNIQUEID_BYTES; i++) {
sprintf(unique_id + (i * 2), "%02x", unique_data[i]);
}
fd = fopen(uniqueFilePath, "w"); fd = fopen(uniqueFilePath, "w");
if (fd == NULL) if (fd == NULL)
return GS_FAILED; return GS_FAILED;