diff options
| author | Shawn Hoffman <godisgovernment@gmail.com> | 2023-03-10 16:53:31 -0800 |
|---|---|---|
| committer | Shawn Hoffman <godisgovernment@gmail.com> | 2023-03-11 12:58:33 -0800 |
| commit | 06cb4ffa648f813c347ca0e807af07f05eaa216c (patch) | |
| tree | 647e06865e8beee8d432863b1834b15e70f8bb31 /Source/Core/WinUpdater | |
| parent | 0a8725e4a97de50b1e267a67492e0cd0c4275010 (diff) | |
winupdater: fix CR getting into parsed VCToolsUpdateURL
Diffstat (limited to 'Source/Core/WinUpdater')
| -rw-r--r-- | Source/Core/WinUpdater/Platform.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/Core/WinUpdater/Platform.cpp b/Source/Core/WinUpdater/Platform.cpp index 0a2b62c5f9..bc8ccb843e 100644 --- a/Source/Core/WinUpdater/Platform.cpp +++ b/Source/Core/WinUpdater/Platform.cpp @@ -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; |
