Friday, 27 November 2015

Re: netsurf: branch master updated. release/3.3-531-gd7907bf

On Wed, Nov 25, 2015 at 00:12:06 +0000, NetSurf Browser Project wrote:
> commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=4ad94124a693528f2ac47a9b4b2e12880586aedf
> commit 4ad94124a693528f2ac47a9b4b2e12880586aedf
> Author: Chris Young <chris@unsatisfactorysoftware.co.uk>
> Commit: Chris Young <chris@unsatisfactorysoftware.co.uk>
>
> Skip invalid commandline args instead of aborting
>
> diff --git a/utils/nsoption.c b/utils/nsoption.c
> index ccdd23a..c83f779 100644
> --- a/utils/nsoption.c
> +++ b/utils/nsoption.c
> @@ -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 -- */

This seems odd Chris.

Instead of stopping consumption of arguments on the first non-configuration
argument, it instead ends up swallowing the entire commandline rendering the
rest of commandline processing worthless.

Could you either fix this so that you get your desired behaviour while not
breaking processing for the rest of us; or else revert the change?

Previously the expectation was:

nsexecutable [nsoption arguments] [frontend specific arguments] [url to launch with]

Now we have:

nsexecutable [nsoption arguments] [anything else is ignored blithely]

Thanks,

Daniel.

--
Daniel Silverstone http://www.netsurf-browser.org/
PGP mail accepted and encouraged. Key Id: 3CCE BABE 206C 3B69

No comments:

Post a Comment