[fix] There is no end judgment when parse ip addr
In this parser, lwespi_parse_number is read up to the delimiter. However, since the end judgment is forgotten, the next character is ignored.
e.g.
192.168.0.1,33:44:55:66:77:88:99
> 3:44:55:66: 77: 88: 99
google transrate
@@ -219,6 +219,9 @@ lwespi_parse_ip(const char** src, lwesp_ip_t* ip) {
ip->type = LWESP_IPTYPE_V4;
for (size_t i = 0; i < LWESP_ARRAYSIZE(ip->addr.ip4.addr); ++i, ++p) {
ip->addr.ip4.addr[i] = lwespi_parse_number(&p);
+ if (*p != '.') {
+ break;
+ }
}
}
if (*p == '"') {
