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;