aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.y
diff options
context:
space:
mode:
Diffstat (limited to 'awkgram.y')
-rw-r--r--awkgram.y7
1 files changed, 4 insertions, 3 deletions
diff --git a/awkgram.y b/awkgram.y
index c10701f8..5abad880 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -3341,11 +3341,12 @@ collect_regexp:
cur_index = tok - tokstart;
if (gawk_mb_cur_max == 1 || nextc_is_1stbyte) switch (c) {
case '[':
- if (nextc(false) == ':' || in_brack == 0)
+ if (nextc(false) == ':' || in_brack == 0) {
in_brack++;
+ if (in_brack == 1)
+ b_index = tok - tokstart;
+ }
pushback();
- if (in_brack == 1)
- b_index = tok - tokstart;
break;
case ']':
if (in_brack > 0