Re: crash when using associative array and integer variable

2010-11-08 Thread Chet Ramey
On 11/8/10 9:18 AM, Roman Rakus wrote: > On 07/28/2010 08:46 AM, Roman Rakus wrote: >> Repeated in the bash-4.0.38 and bash-4.1.7 by the script; >> #!/bin/bash >> >> typeset -Ai s >> y='*' >> z='[' >> s[$y]=1 >> s[$z]=2 >> (( s[$z] = s[$z] + ${s[$y]} )) >> (( s[$y] = s[$y] + ${s[$z]} )) >> [[ ${s[

Re: crash when using associative array and integer variable

2010-11-08 Thread Roman Rakus
On 07/28/2010 08:46 AM, Roman Rakus wrote: Repeated in the bash-4.0.38 and bash-4.1.7 by the script; #!/bin/bash typeset -Ai s y='*' z='[' s[$y]=1 s[$z]=2 (( s[$z] = s[$z] + ${s[$y]} )) (( s[$y] = s[$y] + ${s[$z]} )) [[ ${s[$y]} = 4 ]] && echo "ok" FIX: added check; diff -up bash-4.1/var