fixed finding module index in main()

pull/12/head
Tom Early 7 years ago
parent 39e5d48c65
commit 217bf3d3e1

@ -589,6 +589,7 @@ int main(int argc, const char **argv)
printf("This is free software, and you are welcome to distribute it\nunder certain conditions that are discussed in the LICENSE file.\n\n"); printf("This is free software, and you are welcome to distribute it\nunder certain conditions that are discussed in the LICENSE file.\n\n");
return 0; return 0;
} }
const char *qn = strstr(argv[0], "qnitap"); const char *qn = strstr(argv[0], "qnitap");
if (NULL == qn) { if (NULL == qn) {
fprintf(stderr, "Error finding 'qnitap' in %s!\n", argv[0]); fprintf(stderr, "Error finding 'qnitap' in %s!\n", argv[0]);
@ -597,7 +598,7 @@ int main(int argc, const char **argv)
qn += 6; qn += 6;
int assigned_module; int assigned_module;
switch (argv[1][0]) { switch (*qn) {
case NULL: case NULL:
assigned_module = -1; assigned_module = -1;
break; break;

Loading…
Cancel
Save

Powered by TurnKey Linux.