url: Work around Clang miscompile on mips64el

This commit is contained in:
klzgrad 2024-01-22 00:27:05 +08:00
parent 70f57b7da0
commit 02466c2170

View File

@ -154,7 +154,10 @@ CanonHostInfo::Family DoIPv4AddressToNumber(const CHAR* spec,
while (true) { while (true) {
// If this is not the first character of a component, go to the next // If this is not the first character of a component, go to the next
// component. // 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; --current_position;
continue; continue;
} }