From: Pádraig Brady Date: Wed, 25 May 2022 08:45:57 +0000 (+0100) Subject: sort: fix issue with -rk in previous commit X-Git-Tag: v9.2~191 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e0167ea14329cd3b4a0e392b79ea1a881d71834;p=thirdparty%2Fcoreutils.git sort: fix issue with -rk in previous commit * src/sort.c (keycompare): Fix typo causing -r to be effectively ignored with -k. Fixes https://bugs.gnu.org/55622 --- diff --git a/src/sort.c b/src/sort.c index 81045b1abc..eedc410c36 100644 --- a/src/sort.c +++ b/src/sort.c @@ -2795,7 +2795,7 @@ keycompare (struct line const *a, struct line const *b) } if (key->reverse) - diff = diff < 0 ? -1 : -diff; + diff = diff < 0 ? 1 : -diff; return diff; }