Browse Source

fix scoping of local var in strtok

Jaromil 4 years ago
parent
commit
c66c7b3be3
1 changed files with 2 additions and 1 deletions
  1. 2 1
      zuper

+ 2 - 1
zuper

@@ -273,7 +273,8 @@ strtok() {
273 273
     ckreq || return $?
274 274
 
275 275
     tok=()
276
-    f=0
276
+    local f=0
277
+    local c=0
277 278
     for c in {1..${#_string}}; do
278 279
         if [[ "${_string[(e)$c]}" == "$_delim" ]]; then
279 280
             # check if not empty