mirror of
https://github.com/gryf/wmaker.git
synced 2026-03-03 15:25:53 +01:00
fixed cmdline option duplication bug
This commit is contained in:
14
src/main.c
14
src/main.c
@@ -610,6 +610,7 @@ real_main(int argc, char **argv)
|
|||||||
int i, restart=0;
|
int i, restart=0;
|
||||||
char *str, *alt;
|
char *str, *alt;
|
||||||
int d, s;
|
int d, s;
|
||||||
|
int flag;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
Bool doSync = False;
|
Bool doSync = False;
|
||||||
#endif
|
#endif
|
||||||
@@ -622,13 +623,16 @@ real_main(int argc, char **argv)
|
|||||||
str = wstrconcat("WMAKER_BIN_NAME=", argv[0]);
|
str = wstrconcat("WMAKER_BIN_NAME=", argv[0]);
|
||||||
putenv(str);
|
putenv(str);
|
||||||
|
|
||||||
ArgCount = argc+1;
|
flag= 0;
|
||||||
Arguments = wmalloc(sizeof(char*)*(ArgCount+2));
|
ArgCount = argc;
|
||||||
|
Arguments = wmalloc(sizeof(char*)*(ArgCount+1));
|
||||||
for (i= 0; i < argc; i++)
|
for (i= 0; i < argc; i++)
|
||||||
Arguments[i]= argv[i];
|
{
|
||||||
|
Arguments[i]= argv[i];
|
||||||
|
}
|
||||||
/* add the extra option to signal that we're just restarting wmaker */
|
/* add the extra option to signal that we're just restarting wmaker */
|
||||||
Arguments[argc]= "--for-real=";
|
Arguments[argc-1]= "--for-real=";
|
||||||
Arguments[argc+1]= NULL;
|
Arguments[argc]= NULL;
|
||||||
|
|
||||||
WMInitializeApplication("WindowMaker", &argc, argv);
|
WMInitializeApplication("WindowMaker", &argc, argv);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user