mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Fix a bug in the parser table compression algorithm of lemon. (CVS 1249)
FossilOrigin-Name: 8d3e924975681a871e0eeac3b6a62cffdb947ac7
This commit is contained in:
@ -491,7 +491,7 @@ int acttab_insert(acttab *p){
|
||||
** in the worst case. The worst case occurs if the transaction set
|
||||
** must be appended to the current action table
|
||||
*/
|
||||
n = p->mxLookahead - p->mnLookahead + 1;
|
||||
n = p->mxLookahead + 1;
|
||||
if( p->nAction + n >= p->nActionAlloc ){
|
||||
int oldAlloc = p->nActionAlloc;
|
||||
p->nActionAlloc = p->nAction + n + p->nActionAlloc + 20;
|
||||
@ -514,7 +514,7 @@ int acttab_insert(acttab *p){
|
||||
**
|
||||
** i is the index in p->aAction[] where p->mnLookahead is inserted.
|
||||
*/
|
||||
for(i=0; i<p->nAction; i++){
|
||||
for(i=0; i<p->nAction+p->mnLookahead; i++){
|
||||
if( p->aAction[i].lookahead<0 ){
|
||||
for(j=0; j<p->nLookahead; j++){
|
||||
k = p->aLookahead[j].lookahead - p->mnLookahead + i;
|
||||
|
Reference in New Issue
Block a user