1
0
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:
drh
2004-02-19 18:41:53 +00:00
parent 9cbe7ca7db
commit 784d86f716
3 changed files with 9 additions and 9 deletions

View File

@ -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;