diff options
Diffstat (limited to 'src/scalarproduct/scalarproduct_api.c')
-rw-r--r-- | src/scalarproduct/scalarproduct_api.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/scalarproduct/scalarproduct_api.c b/src/scalarproduct/scalarproduct_api.c index 09c726c88..eed7c315b 100644 --- a/src/scalarproduct/scalarproduct_api.c +++ b/src/scalarproduct/scalarproduct_api.c | |||
@@ -190,7 +190,7 @@ process_result_message (void *cls, | |||
190 | gcry_mpi_t num; | 190 | gcry_mpi_t num; |
191 | size_t read = 0; | 191 | size_t read = 0; |
192 | 192 | ||
193 | if (0 != (rc = gcry_mpi_scan (&num, GCRYMPI_FMT_STD, &msg[1], product_len, &read))) | 193 | if (0 != (rc = gcry_mpi_scan (&num, GCRYMPI_FMT_USG, &msg[1], product_len, &read))) |
194 | { | 194 | { |
195 | LOG_GCRY(GNUNET_ERROR_TYPE_ERROR, "gcry_mpi_scan", rc); | 195 | LOG_GCRY(GNUNET_ERROR_TYPE_ERROR, "gcry_mpi_scan", rc); |
196 | gcry_mpi_release (result); | 196 | gcry_mpi_release (result); |
@@ -199,9 +199,9 @@ process_result_message (void *cls, | |||
199 | } | 199 | } |
200 | else | 200 | else |
201 | { | 201 | { |
202 | if (message->range > 0) | 202 | if (0 < message->range) |
203 | gcry_mpi_add (result, result, num); | 203 | gcry_mpi_add (result, result, num); |
204 | else | 204 | else if (0 > message->range) |
205 | gcry_mpi_sub (result, result, num); | 205 | gcry_mpi_sub (result, result, num); |
206 | gcry_mpi_release (num); | 206 | gcry_mpi_release (num); |
207 | } | 207 | } |