From 59ce6e6d06e5ce8628f96bb247a342dec356fe43 Mon Sep 17 00:00:00 2001 From: Fernando Sahmkow Date: Thu, 12 Mar 2020 20:10:51 -0400 Subject: Common/uint128: Correct MSVC Compilation in old versions. --- src/common/uint128.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/common/uint128.cpp') diff --git a/src/common/uint128.cpp b/src/common/uint128.cpp index 7e77588db..16bf7c828 100644 --- a/src/common/uint128.cpp +++ b/src/common/uint128.cpp @@ -19,7 +19,11 @@ u64 MultiplyAndDivide64(u64 a, u64 b, u64 d) { u128 r{}; r[0] = _umul128(a, b, &r[1]); u64 remainder; +#if _MSC_VER < 1923 + return udiv128(r[1], r[0], d, &remainder); +#else return _udiv128(r[1], r[0], d, &remainder); +#endif } #else -- cgit v1.2.3