partially revert "party: fix usage of stoi (#520)" (#521)

This commit is contained in:
Edo 2022-11-05 17:09:44 +00:00 committed by GitHub
parent 573b19a35a
commit 9389b145d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -188,11 +188,11 @@ int main()
// people will start with admin rights if it crashes.
limit_parallel_dll_loading();
std::srand(uint32_t(time(nullptr)));
srand(uint32_t(time(nullptr)));
{
auto premature_shutdown = true;
const auto _ = gsl::finally([&premature_shutdown]
const auto _ = gsl::finally([&premature_shutdown]()
{
if (premature_shutdown)
{
@ -227,12 +227,17 @@ int main()
premature_shutdown = false;
}
catch (std::exception& ex)
catch (std::exception& e)
{
MessageBoxA(nullptr, ex.what(), nullptr, MB_ICONERROR);
MessageBoxA(nullptr, e.what(), "ERROR", MB_ICONERROR);
return 1;
}
}
return static_cast<int>(entry_point());
}
int __stdcall WinMain(HINSTANCE, HINSTANCE, PSTR, int)
{
return main();
}