about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2024-08-15 18:06:19 -0700
committerBart Schaefer <schaefer@zsh.org>2024-08-15 18:06:19 -0700
commit5977d3cdd4b241ab7afff868ed58afc00b45c424 (patch)
tree73507fbd28ac1bdf8383e502954e9380f454e55f /Src
parent8a811b369b8c7338a90bb85e12bc9f0cfb2b6b6d (diff)
downloadzsh-5977d3cdd4b241ab7afff868ed58afc00b45c424.tar.gz
zsh-5977d3cdd4b241ab7afff868ed58afc00b45c424.tar.xz
zsh-5977d3cdd4b241ab7afff868ed58afc00b45c424.zip
unposted: fix parsing of Bang token in value side of array element assignment
Diffstat (limited to 'Src')
-rw-r--r--Src/lex.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/lex.c b/Src/lex.c
index 700af2da1..efbb62b66 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -1402,10 +1402,11 @@ gettokstr(int c, int sub)
 	    /*
 	     * Same logic as Dash, for ! to perform negation in range.
 	     */
-	    if (seen_brct)
+	    if (seen_brct && brct)
 		c = Bang;
 	    else
 		c = '!';
+	    break;
 	case LX2_OTHER:
 	    if (in_brace_param) {
 		if (c == '/') {