Skip to content

Commit 2a15026

Browse files
authored
Merge pull request #11 from steveschnepp/fix-testno-comparison
Fix the test for -t which was inverted.
2 parents 2ee9147 + c8cf0fb commit 2a15026

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mbw.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ int main(int argc, char **argv)
210210
break;
211211
case 't': /* test to run */
212212
testno=strtoul(optarg, (char **)NULL, 10);
213-
if(0>testno) {
214-
printf("Error: test number must be between 0 and %d\n", MAX_TESTS);
213+
if(testno>MAX_TESTS-1) {
214+
printf("Error: test number must be between 0 and %d\n", MAX_TESTS-1);
215215
exit(1);
216216
}
217217
tests[testno]=1;

0 commit comments

Comments
 (0)