aboutsummaryrefslogtreecommitdiff
path: root/libcmix/cmix.c
diff options
context:
space:
mode:
authorDennis Brentjes <d.brentjes@gmail.com>2018-03-18 10:51:46 +0100
committerDennis Brentjes <d.brentjes@gmail.com>2018-03-18 10:51:46 +0100
commit4ae87e3ce2dd1ff326af38561740bd62315b51ba (patch)
treeada457da9ae4976dcaa1be40becdeddc01f6d03f /libcmix/cmix.c
parent1ca1acc4ff5fc47e5171c759ee87b9ed9ccf1ce2 (diff)
downloadcmix-4ae87e3ce2dd1ff326af38561740bd62315b51ba.tar.gz
cmix-4ae87e3ce2dd1ff326af38561740bd62315b51ba.tar.bz2
cmix-4ae87e3ce2dd1ff326af38561740bd62315b51ba.zip
Fixed permutation generation.
Diffstat (limited to 'libcmix/cmix.c')
-rw-r--r--libcmix/cmix.c2
1 files changed, 1 insertions, 1 deletions
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;
}
}