Gentoo Archives: gentoo-portage-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-portage-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-portage-dev] [PATCH] eapply: Fix off-by-one error when parsing options
Date: Sat, 14 Nov 2015 21:42:37
Message-Id: 1447537348-19889-1-git-send-email-mgorny@gentoo.org
1 Fix off-by-one error that skipped the first path when processing options
2 without a double-hyphen.
3 ---
4 bin/phase-helpers.sh | 2 +-
5 1 file changed, 1 insertion(+), 1 deletion(-)
6
7 diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
8 index 6d563b5..3e619dc 100644
9 --- a/bin/phase-helpers.sh
10 +++ b/bin/phase-helpers.sh
11 @@ -1020,7 +1020,7 @@ if ___eapi_has_eapply; then
12 for (( i = 1; i <= ${#@}; ++i )); do
13 if [[ ${@:i:1} != -* ]]; then
14 patch_options=( "${@:1:i-1}" )
15 - files=( "${@:i+1}" )
16 + files=( "${@:i}" )
17 break
18 fi
19 done
20 --
21 2.6.3

Replies