diff mbox

PR java/45773: Arg processing is broken in jvgenmain

Message ID 4CA1B9EA.8090908@redhat.com
State New
Headers show

Commit Message

Andrew Haley Sept. 28, 2010, 9:48 a.m. UTC
Fixed thusly.

Andrew.


2010-09-27  Andrew Haley  <aph@redhat.com>

        PR java/45773
        * jvgenmain.c (main): Fix arg processing.

2Index: jvgenmain.c
diff mbox

Patch

===================================================================
--- jvgenmain.c (revision 164650)
+++ jvgenmain.c (working copy)
@@ -123,8 +123,12 @@ 
   for (i = 1; i < last_arg; ++i)
     {
       const char *p;
+
+      if (strcmp (argv[i], "-D") == 0)
+       continue;
+
       fprintf (stream, "  \"");
-      for (p = &argv[i][2]; *p; ++p)
+      for (p = argv[i]; *p; ++p)
        {
          if (! ISPRINT (*p))
            fprintf (stream, "\\%o", *p);