Skip to content

Commit

Permalink
Fix issue #39
Browse files Browse the repository at this point in the history
On writing pages to a WAL journal encryption was not enabled due to referencing the wrong codec pointer. This corrupted the WAL journal.
  • Loading branch information
utelle committed May 6, 2021
1 parent 286a999 commit 43bd436
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sqlite3mc_vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ SQLITE_PRIVATE void* sqlite3mcPagerCodec(PgHdr* pPg)
if (pFile->pMethods == &mcIoMethodsGlobal)
{
sqlite3mc_file* mcFile = (sqlite3mc_file*) pFile;
Codec* codec = (mcFile->pMainDb) ? mcFile->pMainDb->codec : 0;
Codec* codec = mcFile->codec;
if (codec != 0 && sqlite3mcIsEncrypted(codec))
{
aData = sqlite3mcCodec(codec, pPg->pData, pPg->pgno, 6);
Expand Down

0 comments on commit 43bd436

Please sign in to comment.