1999-08-23 22:23 -0700 Zack Weinberg <zack@bitmover.com>
* cppspec.c: Put a null pointer at the end of the new argv.
From-SVN: r28813
+1999-08-23 22:23 -0700 Zack Weinberg <zack@bitmover.com>
+
+ * cppspec.c: Put a null pointer at the end of the new argv.
+
Mon Aug 23 21:23:24 1999 Jeffrey A Law (law@cygnus.com)
* configure.in: Remove code to select/de-select the haifa
if (new_argc == argc)
return;
- new_argv = (char **) xmalloc (new_argc * sizeof(char *));
+ /* One more slot for a terminating null. */
+ new_argv = (char **) xmalloc ((new_argc + 1) * sizeof(char *));
new_argv[0] = argv[0];
j = 1;
}
if (read_stdin)
- new_argv[j] = "-";
+ new_argv[j++] = "-";
+ new_argv[j] = NULL;
*in_argc = new_argc;
*in_argv = new_argv;
}