diff options
Diffstat (limited to 'src/cut.c')
-rw-r--r-- | src/cut.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -496,9 +496,9 @@ set_fields (const char *fieldstr) if (rp[j].lo <= rp[i].hi) { rp[i].hi = MAX (rp[j].hi, rp[i].hi); - memmove (rp + j, rp + j + 1, - (n_rp - j - 1) * sizeof (struct range_pair)); - --n_rp; + memmove (rp + j, rp + j + 1, (n_rp - j - 1) * sizeof *rp); + n_rp--; + j--; } else break; |