Fix a bug for sort. When the key_separator is not space, the sort commandline tool fails to sort by the 3rd,4th,etc column. For example: when you exec
$ sort -t',' -k 3n on a file which cotains: 1,2,3,4 2,3,4,1 4,1,2,3 3,4,1,2 you got: 4,1,2,3 1,2,3,4 2,3,4,1 3,4,1,2 but the expected output should be: 3,4,1,2 4,1,2,3 1,2,3,4 2,3,4,1 The bug is due to the dependency of "isspace(str[end])" at line 113. When searching for the non-space key_separator, the search stopped just at the position of first key_separator it met. The bug can be easily fixed by adding "end++" when the search have found one separator and exit the for loop. Email:wangxiaojianf...@163.com
0001-Fix-a-bug-for-sort.patch
Description: Binary data
_______________________________________________ Toybox mailing list Toybox@lists.landley.net http://lists.landley.net/listinfo.cgi/toybox-landley.net