commit 2ea7639c7cdf5c18e8dd62f703d5589f7fbf0529
parent 051ab5f507fd13b643fcbc086b98385f904d0606
Author: Marc Stibane <marc@taler.net>
Date: Thu, 20 Aug 2026 19:15:32 +0200
AI: wrong index
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/taler-swift/Sources/taler-swift/Amount.swift b/taler-swift/Sources/taler-swift/Amount.swift
@@ -261,7 +261,7 @@ public final class Amount: Codable, Hashable, @unchecked Sendable, CustomStringC
let amountStr = String(string[string.index(separatorIndex, offsetBy: 1)...])
if let dotIndex = amountStr.firstIndex(of: ".") {
let integerStr = String(amountStr[..<dotIndex])
- let fractionStr = String(amountStr[string.index(dotIndex, offsetBy: 1)...])
+ let fractionStr = String(amountStr[amountStr.index(dotIndex, offsetBy: 1)...])
if (fractionStr.isEmpty) { // reject a trailing separator, e.g. "EUR:1."
throw AmountError.invalidStringRepresentation
}