Fix --proxy option parsing

130.0.6723.40 v130.0.6723.40-2
klzgrad 2024-10-16 20:02:20 +08:00
parent db3214bffa
commit 20c282e3e8
1 changed files with 1 additions and 1 deletions

View File

@ -142,7 +142,7 @@ bool NaiveConfig::Parse(const base::Value::Dict& value) {
remove_auth.ClearPassword();
GURL url_no_auth = url.ReplaceComponents(remove_auth);
std::string proxy_uri = url_no_auth.GetWithEmptyPath().spec();
if (proxy_uri.back() == '/') {
if (!proxy_uri.empty() && proxy_uri.back() == '/') {
proxy_uri.pop_back();
}