mirror of
https://github.com/apple/swift-numerics
synced 2026-11-28 05:14:31 +00:00
Another fix for conversion of multi-word Ints
This commit is contained in:
1 parent
52e7e70caf
commit
aaeb9029e9
1 file changed
+3
@@ -379,6 +379,9 @@ extension BigInt: BinaryInteger {
|
||||
if source > 0 && source.words[source.words.endIndex - 1] > Int.max {
|
||||
words.append(0)
|
||||
}
|
||||
// needed to handle sign-extended multi-word numbers that
|
||||
// actually fit in a single word
|
||||
BigInt._dropExcessWords(words: &words)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user