diff options
Diffstat (limited to 'toys/posix/sort.c')
-rw-r--r-- | toys/posix/sort.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/toys/posix/sort.c b/toys/posix/sort.c index a1722fb2..2b0f5c08 100644 --- a/toys/posix/sort.c +++ b/toys/posix/sort.c @@ -115,7 +115,10 @@ static char *get_key_data(char *str, struct sort_key *key, int flags) // Skip body of key for (; str[end]; end++) { if (TT.key_separator) { - if (str[end]==*TT.key_separator) break; + if (str[end]==*TT.key_separator) { + end++; + break; + } } else if (isspace(str[end])) break; } } |