Commit 43bfa54d0fdadc08fd6ac78fe696da378f59334f

niblo 2019-12-10T12:11:40

md2html.c: Fix printing input file name when output cannot be opened. (#99)

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/md2html/md2html.c b/md2html/md2html.c
index ce79943..c199664 100644
--- a/md2html/md2html.c
+++ b/md2html/md2html.c
@@ -344,7 +344,7 @@ main(int argc, char** argv)
     if(output_path != NULL && strcmp(output_path, "-") != 0) {
         out = fopen(output_path, "wt");
         if(out == NULL) {
-            fprintf(stderr, "Cannot open %s.\n", input_path);
+            fprintf(stderr, "Cannot open %s.\n", output_path);
             exit(1);
         }
     }