Commit 3efb4c3b authored by Ken Thompson's avatar Ken Thompson

fix bounds check in error recovery

(thanks to avp@mit.edu)

R=rsc
CC=golang-dev
https://golang.org/cl/1998041
parent 1f9dfa29
......@@ -3244,7 +3244,7 @@ yydefault:
Errflag = 3
/* find a state where "error" is a legal shift action */
for yyp >= len(YYS) {
for yyp >= 0 {
yyn = yyPact[YYS[yyp].yys] + yyErrCode
if yyn >= 0 && yyn < yyLast {
yystate = yyAct[yyn] /* simulate a shift of "error" */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment