bug
This commit is contained in:
parent
287c4a7bac
commit
aafca0172d
14
ulib/base
14
ulib/base
|
@ -518,13 +518,13 @@ function array_fillrange() {
|
||||||
}
|
}
|
||||||
function array_eq() {
|
function array_eq() {
|
||||||
# tester l'égalité des tableaux $1 et $2
|
# tester l'égalité des tableaux $1 et $2
|
||||||
local __ae_c1="#$1[*]" __ae_c2="#$2[*]"
|
local -a __ae_a1 __ae_a2
|
||||||
[ ${!__ae_c1} -eq ${!__ae_c2} ] || return 1
|
array_copy __ae_a1 "$1"
|
||||||
local __ae_v1s="$1[@]" __ae_v1
|
array_copy __ae_a2 "$2"
|
||||||
local __ae_v2 __ae_i=0
|
[ ${#__ae_a1[*]} -eq ${#__ae_a2[*]} ] || return 1
|
||||||
for __ae_v1 in "${!__ae_v1s}"; do
|
local __ae_v __ae_i=0
|
||||||
__ae_v2="$2[$__ae_i]"
|
for __ae_v in "${__ae_a1[@]}"; do
|
||||||
[ "$__ae_v1" == "${!__ae_v2}" ] || return 1
|
[ "$__ae_v" == "${__ae_a2[$__ae_i]}" ] || return 1
|
||||||
__ae_i=$(($__ae_i + 1))
|
__ae_i=$(($__ae_i + 1))
|
||||||
done
|
done
|
||||||
return 0
|
return 0
|
||||||
|
|
Loading…
Reference in New Issue