diff --git a/testing/nTox.c b/testing/nTox.c index 072c17e3..ec597bc3 100644 --- a/testing/nTox.c +++ b/testing/nTox.c @@ -428,7 +428,9 @@ int main(int argc, char *argv[]) } for(i = 0; i < argc; i++) { - if(argv[i][0] == '-') { + if (argv[i] == NULL){ + break; + } else if(argv[i][0] == '-') { if(argv[i][1] == 'h') { print_help(); exit(0); diff --git a/testing/toxic/main.c b/testing/toxic/main.c index e0e23708..45760b1c 100644 --- a/testing/toxic/main.c +++ b/testing/toxic/main.c @@ -288,7 +288,9 @@ int main(int argc, char* argv[]) { ToxWindow* a; for(i = 0; i < argc; i++) { - if(argv[i][0] == '-') { + if (argv[i] == NULL){ + break; + } else if(argv[i][0] == '-') { if(argv[i][1] == 'f') { if(argv[i + 1] != NULL) filename = argv[i + 1];