From 69ff3cc67b4980bb96aa97852b03f3d1eeb3ca09 Mon Sep 17 00:00:00 2001 From: Hongze Cheng Date: Wed, 6 Apr 2022 06:37:22 +0000 Subject: [PATCH] fix an assert bug --- source/libs/tdb/src/db/tdbPage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/tdb/src/db/tdbPage.c b/source/libs/tdb/src/db/tdbPage.c index cc4ce20802..ea75f7fbeb 100644 --- a/source/libs/tdb/src/db/tdbPage.c +++ b/source/libs/tdb/src/db/tdbPage.c @@ -278,7 +278,7 @@ static int tdbPageAllocate(SPage *pPage, int szCell, SCell **ppCell) { // 2. Try to allocate from the page free list cellFree = TDB_PAGE_FCELL(pPage); - ASSERT(cellFree == 0 || cellFree > pPage->pFreeEnd - pPage->pData); + ASSERT(cellFree == 0 || cellFree >= pPage->pFreeEnd - pPage->pData); if (cellFree && pPage->pFreeEnd - pPage->pFreeStart >= TDB_PAGE_OFFSET_SIZE(pPage)) { SCell *pPrevFreeCell = NULL; int szPrevFreeCell;