adjust error handling for CODEC_WRITE_OP and CODEC_JOURNAL_OP only

This commit is contained in:
Stephen Lombardo 2020-11-11 09:55:37 -05:00
parent b395353723
commit 55684b3e94

View File

@ -714,7 +714,6 @@ static void* sqlite3Codec(void *iCtx, void *data, Pgno pgno, int mode) {
if(rc != SQLITE_OK) { /* clear results of failed cipher operation and set error */
sqlcipher_memset((unsigned char*) buffer+offset, 0, page_sz-offset);
sqlcipher_codec_ctx_set_error(ctx, rc);
return NULL;
}
memcpy(pData, buffer, page_sz); /* copy buffer data back to pData and return */
return pData;