aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.y
diff options
context:
space:
mode:
Diffstat (limited to 'awkgram.y')
-rw-r--r--awkgram.y8
1 files changed, 3 insertions, 5 deletions
diff --git a/awkgram.y b/awkgram.y
index 9cf88da3..267cf077 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -3,7 +3,7 @@
*/
/*
- * Copyright (C) 1986, 1988, 1989, 1991-2014 the Free Software Foundation, Inc.
+ * Copyright (C) 1986, 1988, 1989, 1991-2015 the Free Software Foundation, Inc.
*
* This file is part of GAWK, the GNU implementation of the
* AWK Programming Language.
@@ -3035,10 +3035,8 @@ yylex(void)
pushback();
break;
case ']':
- if (tokstart[0] == '['
- && (tok == tokstart + 1
- || (tok == tokstart + 2
- && tokstart[1] == '^')))
+ if (tok[-1] == '['
+ || (tok[-2] == '[' && tok[-1] == '^'))
/* do nothing */;
else
in_brack--;