]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
jartool.c (main): NULL-terminate new_argv.
authorTom Tromey <tromey@redhat.com>
Thu, 31 Jan 2002 00:52:16 +0000 (00:52 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Thu, 31 Jan 2002 00:52:16 +0000 (00:52 +0000)
* jartool.c (main): NULL-terminate new_argv.  Pass 0 as argument
to init_args.

From-SVN: r49351

fastjar/ChangeLog
fastjar/jartool.c

index d40abaaa53f5307a684e8065e716eae529f09ae6..41b4f581b3c2597385b6f05e418746fe58da7fee 100644 (file)
@@ -1,3 +1,8 @@
+2002-01-30  Tom Tromey  <tromey@redhat.com>
+
+       * jartool.c (main): NULL-terminate new_argv.  Pass 0 as argument
+       to init_args.
+
 2002-01-11  Tom Tromey  <tromey@redhat.com>
 
        * Makefile.in: Rebuilt.
index dd71592e8b96515f6d4159758de177230bb6f324..afd08a758f282ce2200db7910b355c0ad2422379 100644 (file)
@@ -404,6 +404,7 @@ int main(int argc, char **argv){
      all following options are handled as file names.  */
   while (optind < argc)
     new_argv[new_argc++] = argv[optind++];
+  new_argv[new_argc] = NULL;
 
   if(action == ACTION_NONE){
     fprintf(stderr, "One of options -{ctxu} must be specified.\n");
@@ -495,7 +496,7 @@ int main(int argc, char **argv){
     else if(manifest)
       make_manifest(jarfd, NULL);
     
-    init_args (new_argv, new_argc);
+    init_args (new_argv, 0);
     /* now we add the files to the archive */
     while ((arg = get_next_arg ())){