handle ver1 missing segment

This commit is contained in:
m0duspwnens
2024-09-03 12:53:53 -04:00
parent 529844eb36
commit a920adcf7f

View File

@@ -181,6 +181,10 @@ compare_es_versions() {
# Compare each segment of the versions
for ((i=0; i<${#ver1[@]}; i++)); do
# if a segment in ver1 or ver2 is missing, set it to 0
if [[ -z ${ver1[i]} ]]; then
ver1[i]=0
fi
if [[ -z ${ver2[i]} ]]; then
ver2[i]=0
fi