mirror of
https://github.com/golang/go
synced 2024-11-22 09:24:41 -07:00
fix bounds check in error recovery
(thanks to avp@mit.edu) R=rsc CC=golang-dev https://golang.org/cl/1998041
This commit is contained in:
parent
1f9dfa294f
commit
3efb4c3b63
@ -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" */
|
||||
|
Loading…
Reference in New Issue
Block a user