Fix tavl_delete

This commit is contained in:
Howard Chu 2005-09-26 08:15:37 +00:00
parent a727de0367
commit 53833c6ae6

View File

@ -251,10 +251,9 @@ tavl_delete( Avlnode **root, void* data, AVL_CMP fcmp )
*root = q;
}
/* new parent of p points to p */
if ( depth > 2 ) {
r = pptr[depth-2];
if ( depth > 1 ) {
r = pptr[depth-1];
r->avl_link[1] = p;
pptr[depth-1] = p;
} else {
q->avl_link[0] = p;
}