From: Matthias Kruk Date: Thu, 20 May 2021 00:58:31 +0000 (+0900) Subject: include/opt: Fix C-ish statement X-Git-Url: https://git.corax.cc/?a=commitdiff_plain;h=33ce6ef8b7358833b0afceddc20d877332f1c297;p=toolbox include/opt: Fix C-ish statement The statement used to store the length of the longest option name in opt_add_arg() looks very C-like, meaning it doesn't work correctly in bash. This commit changes the statement to proper shell syntax. --- diff --git a/include/opt.sh b/include/opt.sh index ea67f7f..76bc0c8 100644 --- a/include/opt.sh +++ b/include/opt.sh @@ -90,7 +90,7 @@ opt_add_arg() { __opt_map["--$long"]="$long" if (( __opt_longest < optlen )); then - __opt_longest=optlen; + __opt_longest="$optlen" fi ((__opt_num++))