summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/yacc/reader.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/yacc/reader.c b/usr.bin/yacc/reader.c
index cd871dd2797..3f5a63634cc 100644
--- a/usr.bin/yacc/reader.c
+++ b/usr.bin/yacc/reader.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: reader.c,v 1.19 2006/04/20 04:22:10 cloder Exp $ */
+/* $OpenBSD: reader.c,v 1.20 2006/04/21 07:38:16 deraadt Exp $ */
/* $NetBSD: reader.c,v 1.5 1996/03/19 03:21:43 jtc Exp $ */
/*
@@ -1250,7 +1250,7 @@ end_rule(void)
if (!last_was_action && plhs[nrules]->tag)
{
for (i = nitems - 1; pitem[i]; --i) continue;
- if (pitem[i] == 0 || pitem[i]->tag != plhs[nrules]->tag)
+ if (pitem[i+1] == 0 || pitem[i+1]->tag != plhs[nrules]->tag)
default_action_warning();
}