sort: Fix string length update math

This commit is contained in:
Richard Ipsum 2019-12-31 19:51:00 +00:00 committed by Michael Forney
parent 60895834f0
commit 57c9cab849
1 changed files with 1 additions and 1 deletions

2
sort.c
View File

@ -68,8 +68,8 @@ skipcolumn(struct line *a, int skip_to_next_col)
if ((s = memmem(a->data, a->len, fieldsep, fieldseplen))) {
if (skip_to_next_col) {
s += fieldseplen;
a->len -= s - a->data;
a->data = s;
a->len = a->len - (s - a->data);
}
} else {
a->data += a->len - 1;