aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/update.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/miscutils/update.c b/miscutils/update.c
index 1e3e032fd..18b13e8c9 100644
--- a/miscutils/update.c
+++ b/miscutils/update.c
@@ -52,7 +52,7 @@ extern int update_main(int argc, char **argv)
argc--;
argv++;
- while (**argv == '-') {
+ while (argc>0 && **argv == '-') {
while (*++(*argv)) {
switch (**argv) {
case 'S':