Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix comparison operator error
Begin index didn't be selected.
  • Loading branch information
safocl committed Nov 8, 2023
commit b44f1b121f90d9481d88124ef44e9e122d8b0efc
2 changes: 1 addition & 1 deletion api/IPAddress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ bool IPAddress::operator==(const uint8_t* addr) const
{
// IPv4 only comparison to byte pointer
// Can't support IPv6 as we know our type, but not the length of the pointer
return _type == IPv4 && std::equal(_address.begin(), _address.end(), addr);
return _type == IPv4 && std::equal(_address.begin() + IPADDRESS_V4_BYTES_INDEX, _address.end(), addr);
}

uint8_t IPAddress::operator[](int index) const {
Expand Down