From 3e16491d77dcafe12a255eb4342ba89f5ed35d4b Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Thu, 2 Oct 2014 06:29:49 +0000 Subject: [PATCH] Make sure to not skip any argument when converting from deprecated +POS1, -POS2 to -kPOS1,POS2, so that sort +0n gets translated to sort -k1,1n as it is expected PR: 193994 Submitted by: rodrigo MFC after: 3 days --- usr.bin/sort/sort.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/sort/sort.c b/usr.bin/sort/sort.c index d811a868bc6c..372c661d40ee 100644 --- a/usr.bin/sort/sort.c +++ b/usr.bin/sort/sort.c @@ -897,7 +897,7 @@ fix_obsolete_keys(int *argc, char **argv) } } } - sprintf(sopt, "-k%d.%d", f1, c1); + sprintf(sopt, "-k%d.%d%s", f1, c1, sopts1); argv[i] = sort_strdup(sopt); } }