diff --git a/src/url/url_canon_ip.cc b/src/url/url_canon_ip.cc index 4a1b41ebf4..7ccd8ba77f 100644 --- a/src/url/url_canon_ip.cc +++ b/src/url/url_canon_ip.cc @@ -154,7 +154,10 @@ CanonHostInfo::Family DoIPv4AddressToNumber(const CHAR* spec, while (true) { // If this is not the first character of a component, go to the next // component. - if (current_position != host.begin && spec[current_position - 1] != '.') { + // XXX: On mips64el, using + // `current_position != host.begin && spec[current_position - 1] != '.'` + // would have current_position going to the negative. + if (current_position > host.begin && spec[current_position - 1] != '.') { --current_position; continue; }