aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2023-10-30 19:03:17 +0000
committerdrh <>2023-10-30 19:03:17 +0000
commitf3f0bd2155d2200b5a3d4975ddbde94d44164ba1 (patch)
treeaa409ee21c5a96fde80f9ed772f5f720e5b8fbc7 /src
parent383295eb17072c4a88b73d4ff7963c1eb4ea2dcd (diff)
downloadsqlite-f3f0bd2155d2200b5a3d4975ddbde94d44164ba1.tar.gz
sqlite-f3f0bd2155d2200b5a3d4975ddbde94d44164ba1.zip
Add a cast to i64 for an integer in an sqlite3OsWrite() offset
calculation. The cast is not strictly necessary, but it helps human readers see that the code is correct. FossilOrigin-Name: 7564ff1ba2c2fba89106d1aa06cc5379e752f119f22370f2f155f24cc698dec6
Diffstat (limited to 'src')
-rw-r--r--src/pager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pager.c b/src/pager.c
index 826e90f13..e54750424 100644
--- a/src/pager.c
+++ b/src/pager.c
@@ -6593,7 +6593,7 @@ int sqlite3PagerCommitPhaseOne(
int szPage = (int)pPager->pageSize;
memset(pTmp, 0, szPage);
rc = sqlite3OsWrite(pPager->fd, pTmp, szPage,
- (pPager->dbSize*pPager->pageSize)-szPage);
+ ((i64)pPager->dbSize*pPager->pageSize)-szPage);
}
if( rc==SQLITE_OK ){
rc = sqlite3OsFileControl(fd, SQLITE_FCNTL_COMMIT_ATOMIC_WRITE, 0);