commit:     1845331d052783417c7d105b9fa409c35b728dd8
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 14 21:41:44 2015 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Nov 14 22:12:55 2015 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=1845331d

eapply: Fix off-by-one error when parsing options

Fix off-by-one error that skipped the first path when processing options
without a double-hyphen.

Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>

 bin/phase-helpers.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh
index 0f79fc1..afb85da 100644
--- a/bin/phase-helpers.sh
+++ b/bin/phase-helpers.sh
@@ -1020,7 +1020,7 @@ if ___eapi_has_eapply; then
                        for (( i = 1; i <= ${#@}; ++i )); do
                                if [[ ${@:i:1} != -* ]]; then
                                        patch_options=( "${@:1:i-1}" )
-                                       files=( "${@:i+1}" )
+                                       files=( "${@:i}" )
                                        break
                                fi
                        done

Reply via email to