Skip to content

Commit

Permalink
Re-initialize countrycodestr on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
adabreuti committed Mar 29, 2022
1 parent f5e3aa9 commit 4c24cff
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/controller/CHIPDeviceController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1720,6 +1720,7 @@ void DeviceCommissioner::PerformCommissioningStep(DeviceProxy * proxy, Commissio
if (status != CHIP_NO_ERROR)
{
actualCountryCodeSize = 2;
memset(countryCodeStr, 58, actualCountryCodeSize);
ChipLogError(Controller, "Unable to find country code, defaulting to XX");
}
chip::CharSpan countryCode(countryCodeStr, actualCountryCodeSize);
Expand Down

0 comments on commit 4c24cff

Please sign in to comment.