From 1e0b30405dd8a9fdd8d3ebf72560a1baecec2387 Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Mon, 31 Jan 2022 21:06:29 +0000 Subject: Fix mix :) --- functions.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'functions.c') diff --git a/functions.c b/functions.c index 8770f40..e3987ff 100644 --- a/functions.c +++ b/functions.c @@ -530,8 +530,8 @@ fnMix(Array *right) index[commonrank-1-k] = 0; index[commonrank-2-k]++; } - if(offset < a->size){ - result->arraydata[i*commonsize+offset] = arrayitem(a, offset); + if(j < a->size){ + result->arraydata[i*commonsize+offset] = arrayitem(a, j); offset++; index[commonrank-1]++; }else if(offset < commonsize){ -- cgit v1.2.3