diff options
| author | Anton <anton@picapica> | 2026-04-30 03:57:10 +0400 |
|---|---|---|
| committer | Anton <anton@picapica> | 2026-04-30 03:57:10 +0400 |
| commit | 62b3a87abf4343e5c0cd1358dc958f06277a09d0 (patch) | |
| tree | e5790e240f880fd3969daff927343c8c2b98414a /PICA_node.c | |
| parent | dc8dc3d49d4b98e28cee3e68cf408bc8af9633b9 (diff) | |
| download | pica-pica-62b3a87abf4343e5c0cd1358dc958f06277a09d0.tar.gz pica-pica-62b3a87abf4343e5c0cd1358dc958f06277a09d0.zip | |
pica-node: fix bug in client tree node removal
Diffstat (limited to 'PICA_node.c')
| -rw-r--r-- | PICA_node.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/PICA_node.c b/PICA_node.c index 7394842..3effa99 100644 --- a/PICA_node.c +++ b/PICA_node.c @@ -2020,9 +2020,14 @@ void client_tree_remove(struct client* ci) if (lm != ci->right) { lm->up->left = lm->right; + if (lm->right) + lm->right->up = lm->up; // FIX 1 lm->right = ci->right; + ci->right->up = lm; // FIX 2 } lm->left = ci->left; + if (ci->left) + ci->left->up = lm; // FIX 3 lm->up = ci->up; *p_link = lm; } |
