From a7c6ea4cd83f418a2d10c06f1591c24a76591646 Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Mon, 6 Jan 2020 19:26:50 +0800 Subject: [PATCH] syntax: workaround Bash-4.1 arithmetic bug --- lib/core-syntax.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core-syntax.sh b/lib/core-syntax.sh index 74047abd..c3d21a77 100644 --- a/lib/core-syntax.sh +++ b/lib/core-syntax.sh @@ -797,7 +797,7 @@ function ble/syntax/parse/nest-equals { #%if !release ((onest[3]!=0&&onest[3]<=parent_inest)) || { ble/util/stackdump "invalid nest onest[3]=${onest[3]} parent_inest=$parent_inest text=$text" && return 0; } #%end - ((onest[3]<0?(parent_inest=onest[3]):(parent_inest-=onest[3]))) + ((parent_inest=onest[3]<0?onest[3]:(parent_inest-onest[3]))) done }