mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Fix an off-by-one error in the error-handling logic of the Lemon
parser-generator. This does not affect SQLite. [forum:/forumpost/cff80737bf|Forum cff80737bf]. FossilOrigin-Name: 7cca80808cef192fe0479477056a028e230a164fd368e72100def065d424ca2c
This commit is contained in:
@ -981,14 +981,14 @@ void Parse(
|
||||
yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);
|
||||
yymajor = YYNOCODE;
|
||||
}else{
|
||||
while( yypParser->yytos >= yypParser->yystack
|
||||
while( yypParser->yytos > yypParser->yystack
|
||||
&& (yyact = yy_find_reduce_action(
|
||||
yypParser->yytos->stateno,
|
||||
YYERRORSYMBOL)) > YY_MAX_SHIFTREDUCE
|
||||
){
|
||||
yy_pop_parser_stack(yypParser);
|
||||
}
|
||||
if( yypParser->yytos < yypParser->yystack || yymajor==0 ){
|
||||
if( yypParser->yytos <= yypParser->yystack || yymajor==0 ){
|
||||
yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
|
||||
yy_parse_failed(yypParser);
|
||||
#ifndef YYNOERRORRECOVERY
|
||||
|
Reference in New Issue
Block a user