From 6a6b6b94cfc429b9df6d156aa7910321ed85d780 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 29 May 2022 20:52:22 +0200 Subject: [PATCH] fix: std::pow on macOS not supporting i128 --- plugins/builtin/source/content/tools_entries.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/builtin/source/content/tools_entries.cpp b/plugins/builtin/source/content/tools_entries.cpp index 9d50226a3..3c74698fd 100644 --- a/plugins/builtin/source/content/tools_entries.cpp +++ b/plugins/builtin/source/content/tools_entries.cpp @@ -1220,7 +1220,7 @@ namespace hex::plugin::builtin { const auto exponentBias = (u128(1) << (exponentBitCount - 1)) - 1; const long double signValue = signBits == 0 ? 1 : -1; - const long double exponentValue = exponentBits == 0 ? 0 : std::pow(2, i128(exponentBits) - i128(exponentBias)); + const long double exponentValue = exponentBits == 0 ? 0 : std::pow(2, i64(i128(exponentBits) - i128(exponentBias))); const long double mantissaValue = [mantissaBitPosition] { long double mantissa = 1.0; for (i32 bit = 0; bit < mantissaBitCount; bit++) {