diff --git a/src/cmd/5a/lex.c b/src/cmd/5a/lex.c index 3ce1bfe9524..d997754fd3a 100644 --- a/src/cmd/5a/lex.c +++ b/src/cmd/5a/lex.c @@ -68,7 +68,7 @@ main(int argc, char *argv[]) ARGBEGIN { default: c = ARGC(); - if(c >= 0 || c < sizeof(debug)) + if(c >= 0 && c < sizeof(debug)) debug[c] = 1; break; diff --git a/src/cmd/6a/lex.c b/src/cmd/6a/lex.c index 89143e78941..290785c551d 100644 --- a/src/cmd/6a/lex.c +++ b/src/cmd/6a/lex.c @@ -74,7 +74,7 @@ main(int argc, char *argv[]) ARGBEGIN { default: c = ARGC(); - if(c >= 0 || c < sizeof(debug)) + if(c >= 0 && c < sizeof(debug)) debug[c] = 1; break; diff --git a/src/cmd/8a/lex.c b/src/cmd/8a/lex.c index a7840f6258a..2e690851293 100644 --- a/src/cmd/8a/lex.c +++ b/src/cmd/8a/lex.c @@ -74,7 +74,7 @@ main(int argc, char *argv[]) ARGBEGIN { default: c = ARGC(); - if(c >= 0 || c < sizeof(debug)) + if(c >= 0 && c < sizeof(debug)) debug[c] = 1; break;