summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/control.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/control.sh b/lib/control.sh
index a20ea3c..439f52a 100644
--- a/lib/control.sh
+++ b/lib/control.sh
@@ -208,10 +208,8 @@ ob_set_substvar()
# Convert variable name to uppercase and validate.
name="$(echo "${name}" | tr 'a-z-' 'A-Z_')"
- case "${name:- }" in
- *[!A-Z0-9_]*)
- return 125
- ;;
+ case "${name}" in *[!A-Z0-9_]* | '')
+ return 125
esac
# Trim leading and trailing whitespace from value.