1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 12:58:08 +01:00

fixed cmdline option duplication bug

This commit is contained in:
kojima
2004-10-14 19:53:31 +00:00
parent 5f4a3f6777
commit 8502709884
2 changed files with 12 additions and 8 deletions

View File

@@ -610,6 +610,7 @@ real_main(int argc, char **argv)
int i, restart=0;
char *str, *alt;
int d, s;
int flag;
#ifdef DEBUG
Bool doSync = False;
#endif
@@ -622,13 +623,16 @@ real_main(int argc, char **argv)
str = wstrconcat("WMAKER_BIN_NAME=", argv[0]);
putenv(str);
ArgCount = argc+1;
Arguments = wmalloc(sizeof(char*)*(ArgCount+2));
flag= 0;
ArgCount = argc;
Arguments = wmalloc(sizeof(char*)*(ArgCount+1));
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 */
Arguments[argc]= "--for-real=";
Arguments[argc+1]= NULL;
Arguments[argc-1]= "--for-real=";
Arguments[argc]= NULL;
WMInitializeApplication("WindowMaker", &argc, argv);