aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/util')
-rw-r--r--src/util/amount.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/amount.c b/src/util/amount.c
index e443a0d24..fb5a41d74 100644
--- a/src/util/amount.c
+++ b/src/util/amount.c
@@ -709,6 +709,13 @@ int
TALER_amount_round_down (struct TALER_Amount *amount,
const struct TALER_Amount *round_unit)
{
+ if (GNUNET_OK !=
+ TALER_amount_cmp_currency (amount,
+ round_unit))
+ {
+ GNUNET_break (0);
+ return GNUNET_SYSERR;
+ }
if ( (0 != round_unit->fraction) &&
(0 != round_unit->value) )
{