Fix an off-by-one error in the dist3 algorithm of the spellfix extension.

FossilOrigin-Name: 5c34af7b975598bbe20751dfdd346f43031cb2bcb6b78f1bbdb2b51b398de182
This commit is contained in:
drh
2018-03-30 15:59:54 +00:00
parent d99f49fcc9
commit 9f95e48d94
3 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -764,7 +764,7 @@ static int editDist3ConfigLoad(
assert( zTo!=0 || nTo==0 );
if( nFrom>100 || nTo>100 ) continue;
if( iCost<0 ) continue;
if( iCost>10000 ) continue; /* Costs above 10K are considered infinite */
if( iCost>=10000 ) continue; /* Costs above 10K are considered infinite */
if( pLang==0 || iLang!=iLangPrev ){
EditDist3Lang *pNew;
pNew = sqlite3_realloc64(p->a, (p->nLang+1)*sizeof(p->a[0]));