1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Fix an issue with the new memstat.c extension.

FossilOrigin-Name: ce6e80b1303ed161bec2c63735cd2e2bea7b4e9b4ff780d214d408b1a30d50da
This commit is contained in:
drh
2018-10-08 20:04:16 +00:00
parent 5f8cb730af
commit 7dd630a893
3 changed files with 8 additions and 8 deletions

View File

@ -235,7 +235,7 @@ static int memstatNext(sqlite3_vtab_cursor *cur){
assert( pCur->iRowid<=MSV_NROW );
while(1){
i = (int)pCur->iRowid - 1;
if( (aMemstatColumn[i].mNull & 2)!=0 || (++pCur->iDb)>=pCur->nDb ){
if( i<0 || (aMemstatColumn[i].mNull & 2)!=0 || (++pCur->iDb)>=pCur->nDb ){
pCur->iRowid++;
if( pCur->iRowid>MSV_NROW ) return SQLITE_OK; /* End of the table */
pCur->iDb = 0;