At line 650 I can read:
if ((leaf->lsize - segsize) - (leaf->lsize - segsize) < BLCKSZ / 4) break;
I believe one of the two should be leaf->rsize
-- cpp-today.blogspot.com