diff options
-rw-r--r-- | functions.c | 4 |
1 files changed, 2 insertions, 2 deletions
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){ |