aboutsummaryrefslogtreecommitdiff
path: root/libcmix
diff options
context:
space:
mode:
Diffstat (limited to 'libcmix')
-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;
}
}