diff --git a/Sources/BigInt/BigInt.swift b/Sources/BigInt/BigInt.swift index 5d9fd30..fe260c6 100644 --- a/Sources/BigInt/BigInt.swift +++ b/Sources/BigInt/BigInt.swift @@ -376,7 +376,7 @@ extension BigInt: BinaryInteger { self = BigInt._digits[Int(source)] } else { words = Words(source.words) - if source > Int.max { + if source.words[source.words.endIndex - 1] > Int.max { words.append(0) } }