commit 5ad71a466bc14392e634583fc6ed9d37a2693952
Author: FRIGN <[email protected]>
AuthorDate: Mon Mar 7 11:18:30 2016 +0100
Commit: sin <[email protected]>
CommitDate: Thu Mar 10 08:48:09 2016 +0000
Error out when giving an empty delimiter to sort(1)
diff --git a/sort.c b/sort.c
index 3a0c827..5cfe801 100644
--- a/sort.c
+++ b/sort.c
@@ -364,6 +364,8 @@ main(int argc, char *argv[])
break;
case 't':
fieldsep = EARGF(usage());
+ if (!*fieldsep)
+ eprintf("empty delimiter\n");
fieldseplen = unescape(fieldsep);
break;
case 'u':