[libc-commits] [libc] [libc][NFC] Fix missing replacement in BigInt (PR #81864)

Guillaume Chatelet via libc-commits libc-commits at lists.llvm.org
Thu Feb 15 06:24:48 PST 2024


https://github.com/gchatelet created https://github.com/llvm/llvm-project/pull/81864

None

>From e5dc8aeeedc8cecf3ef01dca7cc183041989453d Mon Sep 17 00:00:00 2001
From: Guillaume Chatelet <chatelet.guillaume at gmail.com>
Date: Thu, 15 Feb 2024 15:24:22 +0100
Subject: [PATCH] [libc][NFC] Fix missing replacement in BigInt

---
 libc/src/__support/UInt.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libc/src/__support/UInt.h b/libc/src/__support/UInt.h
index 0828a34ba1a934..a1e9c4cda4e163 100644
--- a/libc/src/__support/UInt.h
+++ b/libc/src/__support/UInt.h
@@ -65,7 +65,7 @@ struct BigInt {
         val[i] = other[i];
     } else {
       size_t i = 0;
-      for (; i < OtherBits / 64; ++i)
+      for (; i < OtherBits / WORD_SIZE; ++i)
         val[i] = other[i];
       WordType sign = 0;
       if constexpr (Signed && OtherSigned) {



More information about the libc-commits mailing list