Fix regression introduced by SVN r270954. Correct way to reset getopts
is to set OPTIND to 1, not unset it (which causes an error). Thanks to: jilles
This commit is contained in:
parent
6e52173261
commit
b74ae45b45
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=270989
@ -2116,7 +2116,7 @@ f_dialog_init()
|
||||
f_dprintf "f_dialog_init: ARGV=[%s] GETOPTS_STDARGS=[%s]" \
|
||||
"$ARGV" "$GETOPTS_STDARGS"
|
||||
SECURE=`set -- $ARGV
|
||||
unset OPTIND
|
||||
OPTIND=1
|
||||
while getopts \
|
||||
"$GETOPTS_STDARGS$GETOPTS_EXTRA$GETOPTS_ALLFLAGS" \
|
||||
flag > /dev/null; do
|
||||
@ -2126,7 +2126,7 @@ f_dialog_init()
|
||||
done
|
||||
` # END-BACKTICK
|
||||
USE_XDIALOG=`set -- $ARGV
|
||||
unset OPTIND
|
||||
OPTIND=1
|
||||
while getopts \
|
||||
"$GETOPTS_STDARGS$GETOPTS_EXTRA$GETOPTS_ALLFLAGS" \
|
||||
flag > /dev/null; do
|
||||
|
Loading…
Reference in New Issue
Block a user