patch for options to fix app_argv/app_argc

Life is hard, and then you die rtschalaer at 2wire.com
Fri Oct 12 17:11:37 CDT 2001


  Hi,

Using both the current CVS and the snapshot from 20011004, I had the
problem that the argv passed to the application included the 'wine'
command itself. Attached is a simple patch to misc/options.c which
adjusts app_argv (and app_argc) so that argv[0] is the application,
not 'wine'.

I barely know wine, so I'm not completely sure if the fix is at the
right place. But, "it works for me".


  Cheers,

  Ronald

-------------- next part --------------
Index: misc/options.c
===================================================================
RCS file: /home/wine/wine/misc/options.c,v
retrieving revision 1.28
diff -u -d -b -w -r1.28 options.c
--- misc/options.c	2001/07/23 00:04:02	1.28
+++ misc/options.c	2001/10/10 20:39:35
@@ -342,9 +342,9 @@
     }
 
     /* count the resulting arguments */
-    app_argv = argv;
+    app_argv = argv + 1;
     app_argc = 0;
-    while (argv[app_argc]) app_argc++;
+    while (app_argv[app_argc]) app_argc++;
 }
 
 


More information about the wine-patches mailing list