diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/btree.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/btree.c b/src/btree.c index a73896e16..fb3b89fe1 100644 --- a/src/btree.c +++ b/src/btree.c @@ -864,7 +864,11 @@ static int btreeRestoreCursorPosition(BtCursor *pCur){ ** back to where it ought to be if this routine returns true. */ int sqlite3BtreeCursorHasMoved(BtCursor *pCur){ - return pCur->eState!=CURSOR_VALID; + assert( EIGHT_BYTE_ALIGNMENT(pCur) + || pCur==sqlite3BtreeFakeValidCursor() ); + assert( offsetof(BtCursor, eState)==0 ); + assert( sizeof(pCur->eState)==1 ); + return CURSOR_VALID != *(u8*)pCur; } /* |