mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-22 14:02:22 -05:00
fix(installation): loop to max_len-1
avoid `i` going outside range of array indices
This commit is contained in:
parent
0ea42f60bd
commit
4bdd3c036b
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,7 @@ function vercomp() {
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for i in `seq 0 $max_len`
|
for i in `seq 0 $((max_len-1))`
|
||||||
do
|
do
|
||||||
# Fill empty fields with zeros in v1
|
# Fill empty fields with zeros in v1
|
||||||
if [ -z "${v1[$i]}" ]
|
if [ -z "${v1[$i]}" ]
|
||||||
|
|
Loading…
Reference in a new issue