Fix UUID displaying incorrectly in BLE Tracker logs (#4187)

This commit is contained in:
Deun Lee 2022-12-20 13:36:16 +09:00 committed by GitHub
parent 573ea55187
commit 8b06135b41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -601,9 +601,9 @@ std::string ESPBTUUID::to_string() const {
default:
case ESP_UUID_LEN_128:
std::string buf;
for (int8_t i = 15; i >= 0; i--) {
for (uint8_t i = 0; i < 16; i++) {
buf += str_snprintf("%02X", 2, this->uuid_.uuid.uuid128[i]);
if (i == 6 || i == 8 || i == 10 || i == 12)
if (i == 3 || i == 5 || i == 7 || i == 9)
buf += "-";
}
return buf;