fix: common.sh: getvar: reset i

usually not a problem though?

Signed-off-by: fukiame <fukiame@proton.me>
This commit is contained in:
Hikarie Fukirei 2026-02-07 23:34:55 +07:00
commit d393998582

View file

@ -29,6 +29,7 @@ strip_all() {
getvar() {
# Usage: getline "n" "pattern" "file"
i=0
while IFS= read -r line; do
i=$((i+1))
[ "$i" = "$1" ] && printf '%s\n' "${line##$2}" && return