diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-03-22 14:27:00 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-03-22 14:28:22 +0000 |
commit | 5bac8101407c3c17ae0217f13c9f5f509cb5314b (patch) | |
tree | 74015a333f05c22a4808b061d7faeb9872c0c188 /desktop/unx/source/args.c | |
parent | c9df84ff25c1b8b12bb6593d8d8615f5d1a347ae (diff) |
You want to fill all arg slots, not overwrite the initial ones
Diffstat (limited to 'desktop/unx/source/args.c')
-rw-r--r-- | desktop/unx/source/args.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/desktop/unx/source/args.c b/desktop/unx/source/args.c index c3b4cb6fd6fd..0f47f791d5eb 100644 --- a/desktop/unx/source/args.c +++ b/desktop/unx/source/args.c @@ -84,8 +84,10 @@ Args *args_parse (void) memset (args, 0, i); args->nArgsTotal = nArgs; + j = 0; + /* sort the -env: args to the front */ - for ( j = i = 0; i < nArgs; ++i ) + for ( i = 0; i < nArgs; ++i ) { rtl_uString *pTmp = NULL; osl_getCommandArg( i, &pTmp ); @@ -97,7 +99,7 @@ Args *args_parse (void) args->nArgsEnv = j; /* Then the other args */ - for ( j = i = 0; i < nArgs; ++i ) + for ( i = 0; i < nArgs; ++i ) { rtl_uString *pTmp = NULL; |