winupdater: fix CR getting into parsed VCToolsUpdateURL

This commit is contained in:
Shawn Hoffman 2023-03-10 16:53:31 -08:00
parent 0a8725e4a9
commit 06cb4ffa64
1 changed files with 4 additions and 1 deletions

View File

@ -103,7 +103,10 @@ private:
auto key_it = map.find(key);
if (key_it == map.end())
continue;
key_it->second = line.substr(equals_index + 1);
auto val_start = equals_index + 1;
auto eol = line.find('\r', val_start);
auto val_size = (eol == line.npos) ? line.npos : eol - val_start;
key_it->second = line.substr(val_start, val_size);
}
}
Map map;