commit 7cae96494c6fd3ba50b9f86a014c6ec178c16db6 parent 929f0bed0ea48668dead809043114b517138fcd5 Author: Christian Grothoff <grothoff@gnunet.org> Date: Thu, 16 Jul 2026 18:05:56 +0200 default to choice 0 if order unclaimed Diffstat:
| M | src/backend/taler-merchant-httpd_get-private-orders.c | | | 6 | ++++-- |
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_get-private-orders.c b/src/backend/taler-merchant-httpd_get-private-orders.c @@ -610,10 +610,12 @@ add_order (void *cls, break; case TALER_MERCHANT_CONTRACT_VERSION_1: { - struct TALER_MERCHANT_ContractChoice *choice - = &contract->pc->details.v1.choices[choice_index]; + struct TALER_MERCHANT_ContractChoice *choice; + if (-1 == choice_index) + choice_index = 0; /* default choice */ GNUNET_assert (choice_index < contract->pc->details.v1.choices_len); + choice = &contract->pc->details.v1.choices[choice_index]; brutto = &choice->amount; } break;