Commit 1326474
committed
fix(_comp_uniq): avoid expanding array subscripts in arith context
When the array elements contains a confusing value such as
`arr[10]='1],x*=10,a[2'`, (( tmp["${arr[10]}"] )) would be
unexpectedly interpreted as ((tmp[1], x *= 10, a[2])) in bash < 5.2.
We here instead use an independent parameter expansions and
assignments.1 parent 651a424 commit 1326474
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
161 | 161 | | |
| 162 | + | |
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
| |||
0 commit comments