summaryrefslogtreecommitdiffhomepage
path: root/chmod_chown_chgrp.c
diff options
context:
space:
mode:
authorMark Whitley <markw@lineo.com>2000-06-06 17:40:32 +0000
committerMark Whitley <markw@lineo.com>2000-06-06 17:40:32 +0000
commit6ca28ba65c1ca321ee517491eaadcdba60bc0b79 (patch)
tree83653b3c538530b57b1fd9eabf9bfa6334b6a020 /chmod_chown_chgrp.c
parent680d65a646feaea3c3440ca81732c3c09ae95d15 (diff)
Fixed segfault when you type "chmod -R". "chown -R" and "chgrp -R" are still
having problems...
Diffstat (limited to 'chmod_chown_chgrp.c')
-rw-r--r--chmod_chown_chgrp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/chmod_chown_chgrp.c b/chmod_chown_chgrp.c
index c782eb3c4..c0e380a8e 100644
--- a/chmod_chown_chgrp.c
+++ b/chmod_chown_chgrp.c
@@ -118,7 +118,7 @@ int chmod_chown_chgrp_main(int argc, char **argv)
argv++;
/* Parse options */
- while (**argv == '-') {
+ while (argc && (**argv == '-')) {
while (*++(*argv))
switch (**argv) {
case 'R':