diff --git a/apps/ios/ItemAtlas/InventoryAppearance.swift b/apps/ios/ItemAtlas/InventoryAppearance.swift index 9a1ab55..149612e 100644 --- a/apps/ios/ItemAtlas/InventoryAppearance.swift +++ b/apps/ios/ItemAtlas/InventoryAppearance.swift @@ -75,8 +75,8 @@ enum PurchasePrice { let fraction = parts.count == 2 ? parts[1] : "" guard !whole.isEmpty || !fraction.isEmpty, whole.count <= 8, fraction.count <= 2, - whole.allSatisfy({ $0 >= "0" && $0 <= "9" }), - fraction.allSatisfy({ $0 >= "0" && $0 <= "9" }) + whole.utf8.allSatisfy({ (48...57).contains($0) }), + fraction.utf8.allSatisfy({ (48...57).contains($0) }) else { return nil } let yuan = Int64(whole) ?? 0 let minor = (Int64(fraction) ?? 0) * (fraction.count == 1 ? 10 : 1)