From caeeaaa9ddf4fa2613425c557bd7c179df94950f Mon Sep 17 00:00:00 2001 From: Robert Thompson Date: Wed, 29 Jan 2020 09:55:10 -0500 Subject: [PATCH] Another fix for arm32 and actually for anything with multi-word ints UInt64, Int64, etc have more than one word on 32-bit architectures --- Sources/BigInt/BigInt.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) } }