From 7b6d2fd9a9ffd0caf45602a96cf09ac73ab85cf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luc=C3=ADa=20Andrea=20Illanes=20Albornoz?= Date: Wed, 22 Feb 2023 04:43:15 +0100 Subject: subr.ex/ex_init.subr:ex_init_getopts(): reset OPTIND to 0 before calling getopts. --- subr.ex/ex_init.subr | 1 + 1 file changed, 1 insertion(+) diff --git a/subr.ex/ex_init.subr b/subr.ex/ex_init.subr index 80dda794..13e0edd3 100644 --- a/subr.ex/ex_init.subr +++ b/subr.ex/ex_init.subr @@ -128,6 +128,7 @@ ex_init_getopts() { ;; esac; + OPTIND=0; if getopts "${_eig_optstring}" _eig_opt; then "${_eig_fn}" opt "${_eig_rstatus}" "${_eig_opt}" "${OPTARG:-}" "${@}"; _eig_fn_rc="${?}"; -- cgit v1.2.3