summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testing/nTox.c4
-rw-r--r--testing/toxic/main.c4
2 files changed, 6 insertions, 2 deletions
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[])
428 } 428 }
429 429
430 for(i = 0; i < argc; i++) { 430 for(i = 0; i < argc; i++) {
431 if(argv[i][0] == '-') { 431 if (argv[i] == NULL){
432 break;
433 } else if(argv[i][0] == '-') {
432 if(argv[i][1] == 'h') { 434 if(argv[i][1] == 'h') {
433 print_help(); 435 print_help();
434 exit(0); 436 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[]) {
288 ToxWindow* a; 288 ToxWindow* a;
289 289
290 for(i = 0; i < argc; i++) { 290 for(i = 0; i < argc; i++) {
291 if(argv[i][0] == '-') { 291 if (argv[i] == NULL){
292 break;
293 } else if(argv[i][0] == '-') {
292 if(argv[i][1] == 'f') { 294 if(argv[i][1] == 'f') {
293 if(argv[i + 1] != NULL) 295 if(argv[i + 1] != NULL)
294 filename = argv[i + 1]; 296 filename = argv[i + 1];