Skip to content

Commit 21b6456

Browse files
committed
Fix printf format build error in BTAdvertisedDeviceSet.cpp
1 parent 7beab8e commit 21b6456

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/BluetoothSerial/src/BTAdvertisedDeviceSet.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ std::string BTAdvertisedDeviceSet::toString() {
4242
std::string res = "Name: " + getName() + ", Address: " + std::string(getAddress().toString().c_str(), getAddress().toString().length());
4343
if (haveCOD()) {
4444
char val[7]; //6 hex digits + null
45-
snprintf(val, sizeof(val), "%06x", getCOD() & 0xFFFFFF);
45+
snprintf(val, sizeof(val), "%06lx", getCOD() & 0xFFFFFF);
4646
res += ", cod: 0x";
4747
res += val;
4848
}

0 commit comments

Comments
 (0)