diff options
Diffstat (limited to 'src/core/libs/lib-ui.sh')
-rw-r--r-- | src/core/libs/lib-ui.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/libs/lib-ui.sh b/src/core/libs/lib-ui.sh index a1a3528..2a83d17 100644 --- a/src/core/libs/lib-ui.sh +++ b/src/core/libs/lib-ui.sh @@ -302,7 +302,15 @@ _dia_ask_number () then show_warning "$ANSWER_NUMBER is not a number! try again." else - break + if [ -n "$3" -a $ANSWER_NUMBER -gt $3 ] + then + show_warning "$ANSWER_NUMBER is bigger then the maximum,$3! try again." + elif [ -n "$2" -a $ANSWER_NUMBER -lt $2 ] + then + show_warning "$ANSWER_NUMBER is smaller then the minimum,$2! try again." + else + break + fi fi done echo "$ANSWER_NUMBER" |