diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-09-21 13:33:37 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-21 13:35:32 +0200 |
commit | b247950eeeb2ea2345633ee018fbe2c55c1942c0 (patch) | |
tree | a5c1304ebcb6b85a9cd1ed8c33e1d17359f614c7 /desktop/unx/source/args.c | |
parent | 7a8e82a4e3806d5bd500eb6e553e0f40e4d33419 (diff) |
Properly check cmdline args in oosplash
...so that e.g. --headless (starting with a "h") is not also mistaken as -h and
disables pagein and javaldx.
Change-Id: I8a7b2b0373d96ec586975e07e17e7eabe201dcd0
Diffstat (limited to 'desktop/unx/source/args.c')
-rw-r--r-- | desktop/unx/source/args.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/desktop/unx/source/args.c b/desktop/unx/source/args.c index 0952911b5763..0e01123cb242 100644 --- a/desktop/unx/source/args.c +++ b/desktop/unx/source/args.c @@ -126,14 +126,16 @@ Args *args_parse (void) } for ( j = 0; j < SAL_N_ELEMENTS (pArgDescr); ++j ) { - if (!rtl_ustr_indexOfAscii_WithLength - (arg, length, pArgDescr[j].name, strlen (pArgDescr[j].name))) { - + if (rtl_ustr_ascii_compare_WithLength( + arg, length, pArgDescr[j].name) + == 0) + { args->bInhibitSplash |= pArgDescr[j].bInhibitSplash; args->bInhibitPagein |= pArgDescr[j].bInhibitPagein; args->bInhibitJavaLdx |= pArgDescr[j].bInhibitJavaLdx; if (pArgDescr[j].pPageinType) args->pPageinType = pArgDescr[j].pPageinType; + break; } } } |