Don't allow non digits in l=.
This commit is contained in:
parent
018f01ae5e
commit
7099bc7529
1 changed files with 2 additions and 2 deletions
|
@ -75,8 +75,8 @@ else
|
|||
# Adjust 'QS_q' for the locate command by wrapping search elements in *.
|
||||
QS_q="*${QS_q// /* *}*"
|
||||
|
||||
# Adjust 'QS_l' to not go over maximum limit of results, or use default if not supplied.
|
||||
[[ -z "$QS_l" ]] && QS_l="$DEF_RESULTS"
|
||||
# Adjust 'QS_l' to not go over maximum limit of results, or use default if not supplied or invalid.
|
||||
[[ -z "$QS_l" ]] || [[ ! "$QS_l" =~ ^[[:digit:]]+$ ]] && QS_l="$DEF_RESULTS"
|
||||
(( QS_l > MAX_RESULTS )) && QS_l="$MAX_RESULTS"
|
||||
|
||||
# Give success status as checks have passed.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue