From 4ae87e3ce2dd1ff326af38561740bd62315b51ba Mon Sep 17 00:00:00 2001 From: Dennis Brentjes Date: Sun, 18 Mar 2018 10:51:46 +0100 Subject: Fixed permutation generation. --- libcmix/cmix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcmix') diff --git a/libcmix/cmix.c b/libcmix/cmix.c index 0874cf0..50fee36 100644 --- a/libcmix/cmix.c +++ b/libcmix/cmix.c @@ -170,7 +170,7 @@ enum cmix_error generate_permutation(struct CMixContext* ctx) { for(unsigned int i = ctx->nr_participants - 1; i > 0; --i) { unsigned int rand = ctx->api.get_uniform_int(i+1); temp = ctx->permutation[i][m]; - ctx->permutation[i][m] = ctx->permutation[m][rand]; + ctx->permutation[i][m] = ctx->permutation[rand][m]; ctx->permutation[rand][m] = temp; } } -- cgit v1.2.3-70-g09d2