fix country code in cspot

This commit is contained in:
philippe44
2023-03-29 12:06:20 -07:00
parent 236cfef05d
commit a9a9018794
3 changed files with 8 additions and 9 deletions

View File

@@ -120,9 +120,9 @@ void MercurySession::handlePacket() {
switch (static_cast<RequestType>(packet.command)) {
case RequestType::COUNTRY_CODE_RESPONSE: {
this->countryCode = std::string();
this->countryCode.reserve(2);
this->countryCode.resize(2);
memcpy(this->countryCode.data(), packet.data.data(), 2);
CSPOT_LOG(debug, "Received country code");
CSPOT_LOG(debug, "Received country code %s", this->countryCode.c_str());
break;
}
case RequestType::AUDIO_KEY_FAILURE_RESPONSE: