planime: Avoid infinite loop in -A.
[utils.git] / planime
diff --git a/planime b/planime
index b6e27cd..27b3eac 100755 (executable)
--- a/planime
+++ b/planime
@@ -94,6 +94,10 @@ while [ "${1:0:1}" = - ]; do
            ;;
        -A)
            while :; do
+               if [ $# -lt 1 ]; then
+                   echo "planime: unterminated argument list" >&2
+                   exit 1
+               fi
                a="$1"
                shift
                if [ "$a" = \; ]; then