Fix bug found by Joey Hess and forwarded by Bastian Bunk. Add Joey Hess's
test case to the testsuite, plus another one that would have been broken by the first attempt at a fix.
This commit is contained in:
@@ -74,9 +74,7 @@ static char *get_key(char *str, struct sort_key *key, int flags)
|
||||
for(i=1;i<key->range[2*j]+j;i++) {
|
||||
/* Skip leading blanks or first separator */
|
||||
if(str[end]) {
|
||||
if(key_separator) {
|
||||
if(str[end]==key_separator) end++;
|
||||
} else if(isspace(str[end]))
|
||||
if(!key_separator && isspace(str[end]))
|
||||
while(isspace(str[end])) end++;
|
||||
}
|
||||
/* Skip body of key */
|
||||
|
Reference in New Issue
Block a user