Another fix for conversion of multi-word Ints

This commit is contained in:
Robert Thompson committed 2020-01-29 10:42:52 -05:00
1 parent 52e7e70caf
commit aaeb9029e9
1 file changed
+3
+3
View File
@@ -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)
}
}