We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 557e291 commit 6854785Copy full SHA for 6854785
1 file changed
src/NimBLEDevice.cpp
@@ -689,7 +689,7 @@ NimBLEAddress NimBLEDevice::getBondedAddress(int index) {
689
ble_addr_t peer_id_addrs[MYNEWT_VAL(BLE_STORE_MAX_BONDS)];
690
int num_peers, rc;
691
rc = ble_store_util_bonded_peers(&peer_id_addrs[0], &num_peers, MYNEWT_VAL(BLE_STORE_MAX_BONDS));
692
- if (rc != 0 || index > num_peers || index < 0) {
+ if (rc != 0 || index >= num_peers || index < 0) {
693
return NimBLEAddress{};
694
}
695
0 commit comments