mirror of
https://github.com/Orc/discount.git
synced 2026-09-25 04:10:00 +03:00
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:
+2
-2
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user