aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
Diffstat (limited to 'toys')
-rw-r--r--toys/posix/find.c2
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