mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-20 16:34:14 +03:00
Skip invalid commandline args instead of aborting
This commit is contained in:
parent
e27525123b
commit
4ad94124a6
@ -734,8 +734,10 @@ nsoption_commandline(int *pargc, char **argv, struct nsoption_s *opts)
|
||||
|
||||
/* check we have an option */
|
||||
/* option must start -- and be as long as the shortest option*/
|
||||
if ((arglen < (2+5) ) || (arg[0] != '-') || (arg[1] != '-'))
|
||||
break;
|
||||
if ((arglen < (2+5) ) || (arg[0] != '-') || (arg[1] != '-')) {
|
||||
idx++;
|
||||
continue;
|
||||
}
|
||||
|
||||
arg += 2; /* skip -- */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user