sort: fix -s -r interaction: 'stable' order is not affected by -r

function                                             old     new   delta
compare_keys                                         818     820      +2

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2022-01-04 23:53:21 +01:00
parent dfd8aafcf5
commit cc7d2e2178
2 changed files with 16 additions and 1 deletions

View File

@ -380,7 +380,9 @@ static int compare_keys(const void *xarg, const void *yarg)
/* If x > y, 1, else -1 */
retval = (x32 > y32) * 2 - 1;
} else
/* Here, -r has no effect! */
return retval;
}
if (!(option_mask32 & FLAG_no_tie_break)) {
/* fallback sort */
flags = option_mask32;