From 64743a79abf41f8eb4e9f3a3a27b9cb29abb474c Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Sun, 18 Aug 2024 08:54:19 +0800 Subject: [PATCH] fixes when nimvm mixing different types ref https://github.com/nim-lang/Nim/pull/23970 --- constantine/platforms/bithacks.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constantine/platforms/bithacks.nim b/constantine/platforms/bithacks.nim index 99e97aec..db672c1a 100644 --- a/constantine/platforms/bithacks.nim +++ b/constantine/platforms/bithacks.nim @@ -102,7 +102,7 @@ func log2_vartime*[T: SomeUnsignedInt](n: T): T {.inline.} = else: T(log2_impl_vartime(uint32(n))) else: - log2_c_compiler_vartime(n) + T(log2_c_compiler_vartime(n)) func ctz_impl_vartime(n: uint32): uint32 = ## Find the number of trailing zero bits