aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.c
diff options
context:
space:
mode:
Diffstat (limited to 'awkgram.c')
-rw-r--r--awkgram.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/awkgram.c b/awkgram.c
index 93ab99d9..5fcbdfcb 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -5761,11 +5761,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