aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/sort.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2022-08-16 04:28:23 -0500
committerRob Landley <rob@landley.net>2022-08-19 01:51:27 -0500
commit529a25a2eea4a6eea8c4e6420b15bd167d948a0a (patch)
tree3656bb9c510c05c590fb57c58ce51526c5159cf8 /toys/posix/sort.c
parentb8fa90e341ee1b06df32a900c233e62f4e8df7b9 (diff)
downloadtoybox-529a25a2eea4a6eea8c4e6420b15bd167d948a0a.tar.gz
Sort -c reported line number was off by one.
Diffstat (limited to 'toys/posix/sort.c')
-rw-r--r--toys/posix/sort.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/sort.c b/toys/posix/sort.c
index ec30c056..443ca3e8 100644
--- a/toys/posix/sort.c
+++ b/toys/posix/sort.c
@@ -287,7 +287,7 @@ static void sort_lines(char **pline, long len)
if (TT.lines && compare_keys((void *)&TT.lines, &line)>-!!FLAG(u)) {
toys.exitval = 1;
if (FLAG(C)) xexit();
- error_exit("%s: Check line %u", TT.name, TT.linecount);
+ error_exit("%s: Check line %u", TT.name, TT.linecount+1);
}
free(TT.lines);
TT.lines = (void *)line;