Fixed a bug in integer entry.
This commit is contained in:
parent
dd7d85ae3f
commit
7b527a5b12
|
@ -333,14 +333,14 @@ function l_int () {
|
|||
answer="`cat MCdialog.out`"
|
||||
answer="${answer:-$3}"
|
||||
|
||||
if expr $answer : '0$\|-\?[1-9][0-9]*$' >/dev/null
|
||||
if expr $answer : '0$\|[1-9][0-9]*$' >/dev/null
|
||||
then
|
||||
eval $2="$answer"
|
||||
else
|
||||
eval $2="$3"
|
||||
echo -en "\007"
|
||||
${DIALOG} --backtitle "$backtitle" \
|
||||
--msgbox "You have made an invalid entry." 3 43
|
||||
--msgbox "You have made an invalid entry." 5 43
|
||||
fi
|
||||
|
||||
break
|
||||
|
@ -1035,7 +1035,7 @@ followed by the <SPACE BAR>.
|
|||
Press <?> for additional information about this option."
|
||||
|
||||
inputbox_instructions_int="\
|
||||
Please enter a decimal value between 1 and 9999. \
|
||||
Please enter a decimal value between 1 and 99999. \
|
||||
Fractions will not be accepted. \
|
||||
Use the <TAB> key to move from the input field to the buttons below it."
|
||||
|
||||
|
|
Loading…
Reference in New Issue