Update confid.cpp

This commit is contained in:
pottzman 2023-09-07 18:05:58 +10:00 committed by GitHub
parent f347231362
commit 6c06732331
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -942,7 +942,7 @@ int ConfirmationID::Generate(const char* installation_id_str, char confirmation_
} }
if (strcmp(&channelid[0], "OEM") == 0) { if (strcmp(&channelid[0], "OEM") == 0) {
productID[1] = stoi(productid.substr(12,3)); productID[1] = stoi(productid.substr(12,3));
productID[2] = (stoi(productid.substr(15,1)) * 1000000) + stoi(productid.substr(18,5)); productID[2] = (stoi(productid.substr(15,1)) * 100000) + stoi(productid.substr(18,5));
productID[2] = calculateCheckDigit(productID[2]); productID[2] = calculateCheckDigit(productID[2]);
productID[3] = ((stoi(productid.substr(10,2))) * 1000) + productID[3]; productID[3] = ((stoi(productid.substr(10,2))) * 1000) + productID[3];
} else { } else {