mirror of
https://git.busybox.net/busybox
synced 2025-05-10 04:33:59 +02:00
Collapsing arithmetic expansion is incorrect when the inner arithmetic expansion is a part of a parameter expansion. Test case: unset a echo $((3 + ${a:=$((4 + 5))})) echo $a Old result: 12 (4 + 5) New result: 12 9 Based on commit bb777a6 from git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu function old new delta readtoken1 3180 3163 -17 Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
3 lines
47 B
Text
Executable file
3 lines
47 B
Text
Executable file
unset a
|
|
echo $((3 + ${a:=$((4 + 5))}))
|
|
echo $a
|