diff --git a/source/lib/sysdep/acpi.cpp b/source/lib/sysdep/acpi.cpp index 5eaa45674a..fd3b6cb8c8 100644 --- a/source/lib/sysdep/acpi.cpp +++ b/source/lib/sysdep/acpi.cpp @@ -63,7 +63,7 @@ static u8 ComputeChecksum(PCV_u8 buf, size_t numBytes) // (can't use std::accumulate - we need 8-bit wraparound) u8 sum = 0; for(PCV_u8 p = buf; p < buf+numBytes; p++) - sum = u8(sum + *p); + sum = u8((sum + *p) & 0xFF); return sum; } diff --git a/source/lib/sysdep/arch/x86_x64/x86_x64.cpp b/source/lib/sysdep/arch/x86_x64/x86_x64.cpp index d066a6dab2..672d4c0c63 100644 --- a/source/lib/sysdep/arch/x86_x64/x86_x64.cpp +++ b/source/lib/sysdep/arch/x86_x64/x86_x64.cpp @@ -45,7 +45,7 @@ #endif #define CPUID_INTRINSIC 0 -#if MSC_VERSION > 1500 || (MSC_VERSION == 1500 && _MSC_FULL_VER >= 150030729) // __cpuidex available on VC10+ and VC9 SP1 (allows setting ecx beforehand) +#if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 150030729 // __cpuidex available on VC10+ and VC9 SP1 (allows setting ecx beforehand) # undef CPUID_INTRINSIC # define CPUID_INTRINSIC 1 #else