taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit 35baf2cc7bf026a8b3fa74166b57725606b19402
parent f60361f0bb602bb3fcfc39c780255219465e4efc
Author: Marc Stibane <marc@taler.net>
Date:   Sat, 22 Aug 2026 09:18:45 +0200

AI: prevent division by 0

Diffstat:
MTalerWallet1/Views/HelperViews/BarGraph.swift | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/TalerWallet1/Views/HelperViews/BarGraph.swift b/TalerWallet1/Views/HelperViews/BarGraph.swift @@ -80,7 +80,7 @@ struct BarGraph: View { let common = transaction.common let incoming = common.isIncoming let netto = common.amountEffective.value - let valueColored = barHeight * netto / maxValue + let valueColored = maxValue > 0 ? barHeight * netto / maxValue : 0 let valueTransparent = barHeight - valueColored // let _ = print("max: \(maxValue), ", incoming ? "+" : "-", netto) VStack(spacing: 0) {