From 337f7589f83bce306283bbbd0624a3e173660515 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Sat, 22 Sep 2018 22:48:01 +0300 Subject: [PATCH] mdbx: backport - fix mdbx_pnl_search(). --- src/mdbx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mdbx.c b/src/mdbx.c index 8b7f4b82..577f3c01 100644 --- a/src/mdbx.c +++ b/src/mdbx.c @@ -650,8 +650,8 @@ static unsigned __hot mdbx_pnl_search(MDBX_PNL pnl, pgno_t id) { while (n > 0) { unsigned pivot = n >> 1; cursor = base + pivot + 1; - val = MDBX_PNL_ASCENDING ? mdbx_cmp2int(pnl[cursor], id) - : mdbx_cmp2int(id, pnl[cursor]); + val = MDBX_PNL_ASCENDING ? mdbx_cmp2int(id, pnl[cursor]) + : mdbx_cmp2int(pnl[cursor], id); if (val < 0) { n = pivot;