From 85c85d1a1beec3ff0a7d40b3524201b02f1e3d63 Mon Sep 17 00:00:00 2001 From: Reece Wilson Date: Fri, 12 Aug 2022 23:13:30 +0100 Subject: [PATCH] [*] 32BIT MAKING ME MALD (critical bitscan forward bug under 32bit targets) --- Include/auROXTL/auBitsUtils.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Include/auROXTL/auBitsUtils.hpp b/Include/auROXTL/auBitsUtils.hpp index f706418..2bb534d 100644 --- a/Include/auROXTL/auBitsUtils.hpp +++ b/Include/auROXTL/auBitsUtils.hpp @@ -38,7 +38,7 @@ static auline bool AuBitScanForward(AuUInt8 &index, T value) if constexpr (sizeof(T) == sizeof(AuUInt64)) { #if defined(AURORA_IS_32BIT) - if (!_BitScanForward(&ret, static_cast(value & 0xffffffff))) + if (!(success = _BitScanForward(&ret, static_cast(value & 0xffffffff)))) { if (!_BitScanForward(&ret, static_cast((value >> 32) & 0xffffffff))) {