aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.c
diff options
context:
space:
mode:
Diffstat (limited to 'awkgram.c')
-rw-r--r--awkgram.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/awkgram.c b/awkgram.c
index 55c42dbd..2269c589 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -7293,7 +7293,7 @@ snode(INSTRUCTION *subn, INSTRUCTION *r)
else if (r->builtin == do_index) {
arg = subn->nexti->lasti->nexti; /* 2nd arg list */
ip = arg->lasti;
- if (ip->opcode == Op_match_rec)
+ if (ip->opcode == Op_match_rec || ip->opcode == Op_push_re)
fatal(_("index: regexp constant as second argument is not allowed"));
}
#ifdef ARRAYDEBUG