We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2ee9147 commit c8cf0fbCopy full SHA for c8cf0fb
mbw.c
@@ -210,8 +210,8 @@ int main(int argc, char **argv)
210
break;
211
case 't': /* test to run */
212
testno=strtoul(optarg, (char **)NULL, 10);
213
- if(0>testno) {
214
- printf("Error: test number must be between 0 and %d\n", MAX_TESTS);
+ if(testno>MAX_TESTS-1) {
+ printf("Error: test number must be between 0 and %d\n", MAX_TESTS-1);
215
exit(1);
216
}
217
tests[testno]=1;
0 commit comments