aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.c
diff options
context:
space:
mode:
Diffstat (limited to 'awkgram.c')
-rw-r--r--awkgram.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/awkgram.c b/awkgram.c
index 6fb66123..68540e88 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -5578,8 +5578,8 @@ yylex(void)
pushback();
break;
case ']':
- if (tok[-1] == '['
- || (tok[-2] == '[' && tok[-1] == '^'))
+ if ((tok[-1] == '[' && tok[-2] != '\\')
+ || (tok[-2] == '[' && tok[-3] != '\\' && tok[-1] == '^'))
/* do nothing */;
else
in_brack--;