diff options
author | Rob Landley <rob@landley.net> | 2020-12-05 23:59:04 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2020-12-05 23:59:04 -0600 |
commit | 0e675d98f3aba7a834dc56c2ae419f20da376f44 (patch) | |
tree | 5cc325664d03bc24ae28ff891c4ec8a441b42167 /toys | |
parent | b5d276c1047350a13551a98f470fa2d78f4a84f8 (diff) | |
download | toybox-0e675d98f3aba7a834dc56c2ae419f20da376f44.tar.gz |
Fix find empty argument handling and add test.
Diffstat (limited to 'toys')
-rw-r--r-- | toys/posix/find.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/find.c b/toys/posix/find.c index ff127b91..2d8ca0b1 100644 --- a/toys/posix/find.c +++ b/toys/posix/find.c @@ -690,7 +690,7 @@ void find_main(void) // Distinguish paths from filters for (len = 0; toys.optargs[len]; len++) - if (strchr("-!(", *toys.optargs[len])) break; + if (*toys.optargs[len] && strchr("-!(", *toys.optargs[len])) break; TT.filter = toys.optargs+len; // use "." if no paths |