summaryrefslogtreecommitdiff
path: root/sort.c
diff options
context:
space:
mode:
Diffstat (limited to 'sort.c')
-rw-r--r--sort.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sort.c b/sort.c
index b84453d..5ecca8b 100644
--- a/sort.c
+++ b/sort.c
@@ -71,7 +71,7 @@ int sort_main(int argc, char **argv)
while ((line = get_line_from_file(fp)) != NULL) {
lines = xrealloc(lines, sizeof(char *) * (nlines + 1));
- line[strlen(line) - 1] = '\0';
+ chomp(line);
lines[nlines++] = line;
}
}