From 5c85249eaf67fb86c8c1965c0a3746fa15f8e96b Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Tue, 17 Nov 2026 00:58:43 +0100 Subject: [PATCH] fix: correctly set a bit in UInt<>::SetBitInWord(...) method In the UInt::SetBitInWord(...) method for non GNU version there was an error in parameters passed to a intrinsic _bittestandset64(...) function. This affects only the 64 bit build for non GNU version (such as Microsoft compiler) and only when TTMATH_NOASM is not defined. reported by: Victor --- ttmath/ttmathuint_x86_64.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ttmath/ttmathuint_x86_64.h b/ttmath/ttmathuint_x86_64.h index 7ec501d..5a8fb7c 100644 --- a/ttmath/ttmathuint_x86_64.h +++ b/ttmath/ttmathuint_x86_64.h @@ -1026,7 +1026,7 @@ namespace ttmath #ifndef __GNUC__ - old_bit = _bittestandset64((__int64*)&value,bit) != 0; + old_bit = _bittestandset64((__int64*)&v,bit) != 0; #endif