mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-03-29 22:20:48 +00:00
InstallPup: Fix exception on newline trim
Avoid throwing fatal error when installing firmware without a \n character on the version string Fixes #5646
This commit is contained in:
parent
a08cd0fe38
commit
3b01e59cd4
@ -565,7 +565,11 @@ void main_window::InstallPup(const QString& dropPath)
|
|||||||
updatefilenames.end());
|
updatefilenames.end());
|
||||||
|
|
||||||
std::string version_string = pup.get_file(0x100).to_string();
|
std::string version_string = pup.get_file(0x100).to_string();
|
||||||
version_string.erase(version_string.find('\n'));
|
size_t version_pos = version_string.find('\n');
|
||||||
|
if (version_pos != std::string::npos)
|
||||||
|
{
|
||||||
|
version_string.erase(version_pos);
|
||||||
|
}
|
||||||
|
|
||||||
const std::string cur_version = "4.84";
|
const std::string cur_version = "4.84";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user