+ if (colon && (colon == strchr(string, ':') || (string[0] == '[' && colon - string > 0 && colon[-1] == ']')))
+ // EITHER: colon is the ONLY colon OR: colon comes after [...] delimited IPv6 address
+ // fixes misparsing of IPv6 addresses without port
+ {