提交 3d2a77ea 编写于 作者: H Hongze Cheng

fix skiplist crash bug

上级 aca8e364
......@@ -466,7 +466,12 @@ static bool tSkipListGetPosToPut(SSkipList *pSkipList, SSkipListNode **forward,
}
SSkipListNode *px = pSkipList->pHead;
for (int i = pSkipList->level - 1; i >= 0; --i) {
for (int i = pNode->level - 1; i >= 0; --i) {
if (i >= pSkipList->level) {
forward[i] = pSkipList->pHead;
continue;
}
SSkipListNode *p = SL_GET_FORWARD_POINTER(px, i);
while (p != pSkipList->pTail) {
pKey = SL_GET_NODE_KEY(pSkipList, p);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册