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="`cat MCdialog.out`"
|
||||||
answer="${answer:-$3}"
|
answer="${answer:-$3}"
|
||||||
|
|
||||||
if expr $answer : '0$\|-\?[1-9][0-9]*$' >/dev/null
|
if expr $answer : '0$\|[1-9][0-9]*$' >/dev/null
|
||||||
then
|
then
|
||||||
eval $2="$answer"
|
eval $2="$answer"
|
||||||
else
|
else
|
||||||
eval $2="$3"
|
eval $2="$3"
|
||||||
echo -en "\007"
|
echo -en "\007"
|
||||||
${DIALOG} --backtitle "$backtitle" \
|
${DIALOG} --backtitle "$backtitle" \
|
||||||
--msgbox "You have made an invalid entry." 3 43
|
--msgbox "You have made an invalid entry." 5 43
|
||||||
fi
|
fi
|
||||||
|
|
||||||
break
|
break
|
||||||
|
@ -1035,7 +1035,7 @@ followed by the <SPACE BAR>.
|
||||||
Press <?> for additional information about this option."
|
Press <?> for additional information about this option."
|
||||||
|
|
||||||
inputbox_instructions_int="\
|
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. \
|
Fractions will not be accepted. \
|
||||||
Use the <TAB> key to move from the input field to the buttons below it."
|
Use the <TAB> key to move from the input field to the buttons below it."
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue