commit fe8f1fbcff6ac104360b67fdb66e64c45c4208ce
parent 002262e7ab9b104915907b33b76276f18f79be7d
Author: Christian Grothoff <christian@grothoff.org>
Date: Thu, 13 Aug 2026 20:30:51 +0200
fix roudning logic
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/util/amount.c b/src/util/amount.c
@@ -840,7 +840,8 @@ TALER_amount_round_down (struct TALER_Amount *amount,
uint64_t delta;
delta = amount->value % round_unit->value;
- if (0 == delta)
+ if ( (0 == delta) &&
+ (0 == amount->fraction) )
return GNUNET_NO;
amount->value -= delta;
amount->fraction = 0;