exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 426576c2e635b3a0b0b5938eb8ae25e9c17e7c94
parent 90f5ad21f12c9056d23cbf554f91fc0f7d21ba52
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 15 Jun 2025 20:11:09 +0200

handle best_match being empty because nothing matched at all (last fix for #9053)

Diffstat:
Msrc/kyclogic/kyclogic_sanctions.c | 20+++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/src/kyclogic/kyclogic_sanctions.c b/src/kyclogic/kyclogic_sanctions.c @@ -223,11 +223,21 @@ process_buffer (struct TALER_KYCLOGIC_SanctionRater *sr) &confidence, best_match)) { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Malformed input line `%s'\n", - buf); - GNUNET_break (0); - return false; + /* maybe best_match is empty because literally nothing matched */ + if (2 != + sscanf (buf, + "%lf %lf ", + &rating, + &confidence)) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Malformed input line `%s'\n", + buf); + GNUNET_break (0); + return false; + } + strcpy (best_match, + "<none>"); } { struct TALER_KYCLOGIC_EvaluationEntry *ee = sr->ee_tail;