Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6fe1c4c

Browse files
Correct less- and greater-than operators (#6521)
Lets Manufacturer ranges in bluetooth address space be filtered correctly
1 parent 5d6b9d0 commit 6fe1c4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎libraries/BLE/src/BLEAddress.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ bool BLEAddress::operator!=(const BLEAddress& otherAddress) const {
7171
}
7272

7373
bool BLEAddress::operator<(const BLEAddress& otherAddress) const {
74-
return memcmp(otherAddress.m_address, m_address, ESP_BD_ADDR_LEN) < 0;
74+
return memcmp(m_address, otherAddress.m_address, ESP_BD_ADDR_LEN) < 0;
7575
}
7676

7777
bool BLEAddress::operator<=(const BLEAddress& otherAddress) const {
@@ -83,7 +83,7 @@ bool BLEAddress::operator>=(const BLEAddress& otherAddress) const {
8383
}
8484

8585
bool BLEAddress::operator>(const BLEAddress& otherAddress) const {
86-
return memcmp(otherAddress.m_address, m_address, ESP_BD_ADDR_LEN) > 0;
86+
return memcmp(m_address, otherAddress.m_address, ESP_BD_ADDR_LEN) > 0;
8787
}
8888

8989
/**

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /