fix assertion failure in url-classifier when canonicalizing a URI with no host. b=387196, r=tony, a=schrep

This commit is contained in:
dcamp@mozilla.com 2007-07-26 17:52:33 -07:00
parent 5ae1a82c12
commit 5442338176

View File

@ -225,7 +225,7 @@ nsUrlClassifierUtils::CleanupHostname(const nsACString & hostname,
}
// cut off trailing dots
while (_retval[_retval.Length() - 1] == '.') {
while (_retval.Length() > 0 && _retval[_retval.Length() - 1] == '.') {
_retval.SetLength(_retval.Length() - 1);
}
}