mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
(Windows) Trigger emergency shutdown on wide string conversion errors to preserve data integrity at all times.
This commit is contained in:
parent
63a5800e84
commit
f6c109e3fc
|
@ -13,6 +13,7 @@
|
|||
|
||||
#include "utils/StringUtil.h"
|
||||
#include "Log.h"
|
||||
#include "utils/PlatformUtil.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <locale>
|
||||
|
@ -624,6 +625,8 @@ namespace Utils
|
|||
catch (...) {
|
||||
LOG(LogError) << "StringUtil::stringToWideString(): Conversion failed, invalid "
|
||||
"characters in source string?";
|
||||
LOG(LogError) << stringArg;
|
||||
Utils::Platform::emergencyShutdown();
|
||||
return L"";
|
||||
}
|
||||
}
|
||||
|
@ -637,6 +640,7 @@ namespace Utils
|
|||
catch (...) {
|
||||
LOG(LogError) << "StringUtil::wideStringToString(): Conversion failed, invalid "
|
||||
"characters in source string?";
|
||||
Utils::Platform::emergencyShutdown();
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue