Skip to content

Commit

Permalink
Fix comparison operator error
Browse files Browse the repository at this point in the history
Begin index didn't be selected.
  • Loading branch information
safocl committed Nov 8, 2023
1 parent 52b367a commit b44f1b1
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit b44f1b1

Please sign in to comment.