Gentoo Archives: gentoo-portage-dev

From: Zac Medico <zmedico@g.o>
To: gentoo-portage-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: Re: [gentoo-portage-dev] [PATCH] eapply: Fix off-by-one error when parsing options
Date: Sat, 14 Nov 2015 22:00:33
Message-Id: 5647AEF9.2060106@gentoo.org
In Reply to: [gentoo-portage-dev] [PATCH] eapply: Fix off-by-one error when parsing options by "Michał Górny"
1 On 11/14/2015 01:42 PM, Michał Górny wrote:
2 > Fix off-by-one error that skipped the first path when processing options
3 > without a double-hyphen.
4 > ---
5 > bin/phase-helpers.sh | 2 +-
6 > 1 file changed, 1 insertion(+), 1 deletion(-)
7 >
8 > diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
9 > index 6d563b5..3e619dc 100644
10 > --- a/bin/phase-helpers.sh
11 > +++ b/bin/phase-helpers.sh
12 > @@ -1020,7 +1020,7 @@ if ___eapi_has_eapply; then
13 > for (( i = 1; i <= ${#@}; ++i )); do
14 > if [[ ${@:i:1} != -* ]]; then
15 > patch_options=( "${@:1:i-1}" )
16 > - files=( "${@:i+1}" )
17 > + files=( "${@:i}" )
18 > break
19 > fi
20 > done
21 >
22
23 Looks good.
24 --
25 Thanks,
26 Zac