aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wal.c b/src/wal.c
index 3b57184c8..3ac18c74d 100644
--- a/src/wal.c
+++ b/src/wal.c
@@ -433,9 +433,9 @@ static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){
u32 iSlot = walIndexEntry(iFrame);
walIndexMap(pWal, -1);
- while( (iSlot+128)>=pWal->szWIndex ){
+ while( ((iSlot+128)*sizeof(u32))>=pWal->szWIndex ){
int rc;
- int nByte = pWal->szWIndex*4 + WALINDEX_MMAP_INCREMENT;
+ int nByte = pWal->szWIndex + WALINDEX_MMAP_INCREMENT;
/* Enlarge the storage, then remap it. */
rc = walIndexRemap(pWal, nByte);