Commit 8837ac26d00f5a433ec9fd8bc08446b6df4c5bd5

JDG 2019-04-15T10:10:38

* src/tools/apinames.c (main): Fix error message. Reported as https://savannah.nongnu.org/patch/?9796

diff --git a/ChangeLog b/ChangeLog
index f15b345..a977c53 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2019-04-15  JDG  <JonathanG@iQmetrix.com>
+
+	* src/tools/apinames.c (main): Fix error message.
+
+	Reported as
+
+	  https://savannah.nongnu.org/patch/?9796
+
 2019-04-11  Alexei Podtelezhnikov  <apodtele@gmail.com>
 
 	[smooth] Fix segfault in direct mode (#56092).
diff --git a/src/tools/apinames.c b/src/tools/apinames.c
index 06c3260..16c5427 100644
--- a/src/tools/apinames.c
+++ b/src/tools/apinames.c
@@ -384,7 +384,7 @@ int  main( int argc, const char* const*  argv )
         out = fopen( arg, "wt" );
         if ( !out )
         {
-          fprintf( stderr, "could not open '%s' for writing\n", argv[2] );
+          fprintf( stderr, "could not open '%s' for writing\n", arg );
           exit(3);
         }
         break;