diff src/pt-plot.cc @ 3476:78e1e0007f0f

[project @ 2000-01-26 00:05:43 by jwe]
author jwe
date Wed, 26 Jan 2000 00:05:45 +0000
parents d25bc039237b
children d14c483b3c12
line wrap: on
line diff
--- a/src/pt-plot.cc	Tue Jan 25 21:23:09 2000 +0000
+++ b/src/pt-plot.cc	Wed Jan 26 00:05:45 2000 +0000
@@ -1120,16 +1120,23 @@
 	{
 	  delete [] gnuplot_terminal_type;
 	  ostrstream buf;
-	  for (int i = 2; i < argc; i++)
+	  int i;
+	  for (i = 2; i < argc-1; i++)
 	    buf << argv[i] << " ";
+	  if (i < argc)
+	    buf << argv[i];
 	  buf << Vgnuplot_command_end << ends;
 	  gnuplot_terminal_type = buf.str ();
 	}
     }
 
-  for (int i = 0; i < argc; i++)
+  int i;
+  for (i = 0; i < argc-1; i++)
     plot_buf << argv[i] << " ";
 
+  if (i < argc)
+    plot_buf << argv[i];
+
   plot_buf << Vgnuplot_command_end << ends;
 
   char *plot_command = plot_buf.str ();
@@ -1165,8 +1172,11 @@
 
   ostrstream plot_buf;
 
-  for (int i = 0; i < argc; i++)
+  int i;
+  for (i = 0; i < argc-1; i++)
     plot_buf << argv[i] << " ";
+  if (i < argc)
+    plot_buf << argv[i];
 
   plot_buf << Vgnuplot_command_end << ends;