[hackers] [sbase] Error out when giving an empty delimiter to sort(1) || FRIGN

From: <git_AT_suckless.org>
Date: Thu, 10 Mar 2016 09:48:18 +0100 (CET)

commit 5ad71a466bc14392e634583fc6ed9d37a2693952
Author: FRIGN <dev_AT_frign.de>
AuthorDate: Mon Mar 7 11:18:30 2016 +0100
Commit: sin <sin_AT_2f30.org>
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
_AT_@ -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':
Received on Thu Mar 10 2016 - 09:48:18 CET

This archive was generated by hypermail 2.3.0 : Thu Mar 10 2016 - 10:00:49 CET