diff options
Diffstat (limited to 'src/actions/sort.c')
-rw-r--r-- | src/actions/sort.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/actions/sort.c b/src/actions/sort.c index b1e8733..1c8fcac 100644 --- a/src/actions/sort.c +++ b/src/actions/sort.c @@ -161,17 +161,17 @@ void sortrange(struct sheet * sh, struct ent * left, struct ent * right, char * // Fix the 'ent' elements in the sorted range - struct ent * p_aux, * yl = get_yanklist(); + struct ent_ptr * p_aux, * yl = get_yanklist(); for (c = 0, p_aux = yl; p_aux; p_aux = p_aux->next) { - if (rows[c] != p_aux->row) { - for (c = 0; c <= maxr - minr && rows[c] != p_aux->row; c++) ; + if (rows[c] != p_aux->vp->row) { + for (c = 0; c <= maxr - minr && rows[c] != p_aux->vp->row; c++) ; if (c > maxr - minr) { sc_error("sort error"); return; } } - p_aux->row = minr + c; + p_aux->vp->row = minr + c; } sh->currow = minr; |