I was using the wrong argument for the file to make a page from.

needed to check for argc > 0 & argv[0] (after shifting argc/argv
by optind) but was checking argc > 1 & argv[1], which was something
less than useful.
This commit is contained in:
david parsons
2016-04-24 07:40:17 -07:00
parent f49a3cf2fe
commit 55e6d15563
+2 -2
View File
@@ -73,8 +73,8 @@ char **argv;
exit(0);
}
if ( (argc > 1) && !freopen(argv[1], "r", stdin) ) {
perror(argv[1]);
if ( (argc > 0) && !freopen(argv[0], "r", stdin) ) {
perror(argv[0]);
exit(1);
}