Fix build

This commit is contained in:
Federico Cecchetto 2022-09-04 04:28:19 +02:00
parent 8e7d30b484
commit 1d7a886c2b
2 changed files with 5 additions and 9 deletions

View File

@ -112,18 +112,15 @@ namespace arxan
bool is_wine()
{
static bool is_wine = false;
static bool is_wine_set = false;
static std::optional<bool> is_wine = {};
if (!is_wine_set)
if (!is_wine.has_value())
{
const utils::nt::library ntdll("ntdll.dll");
is_wine = ntdll.get_proc<void*>("wine_get_version") != nullptr;
is_wine_set = true;
}
return is_wine;
return is_wine.value();
}
class component final : public component_interface

View File

@ -68,17 +68,16 @@ namespace system_check
void verify_binary_version()
{
const auto value = *reinterpret_cast<DWORD*>(0x1337_b);
if (arxan::is_wine())
{
if (value == 0xFFB81262 && value == 0xFFB81143)
if (value == 0xFFB81262 || value == 0xFFB81143)
{
return;
}
}
else
{
if (value == 0x60202B6A && value == 0xBC0E9FE)
if (value == 0x60202B6A || value == 0xBC0E9FE)
{
return;
}