From b44f1b121f90d9481d88124ef44e9e122d8b0efc Mon Sep 17 00:00:00 2001 From: safocl Date: Wed, 8 Nov 2023 18:08:29 +0400 Subject: [PATCH] Fix comparison operator error Begin index didn't be selected. --- api/IPAddress.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/IPAddress.cpp b/api/IPAddress.cpp index 180371c8..8eeabbae 100644 --- a/api/IPAddress.cpp +++ b/api/IPAddress.cpp @@ -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 {