]> git.eshelyaron.com Git - emacs.git/commitdiff
; * src/itree.c (check_subtree): fix logical error in eassert
authorMatt Armstrong <matt@rfc20.org>
Wed, 12 Oct 2022 03:19:16 +0000 (20:19 -0700)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 12 Oct 2022 18:01:05 +0000 (14:01 -0400)
src/itree.c

index deef0335cfd14bd27afa2a17037e21fb9f383a9f..1728a8ab3a1e8b8b68100f17dc2a99cf1fb501b0 100644 (file)
@@ -277,7 +277,7 @@ check_subtree (struct interval_node *node,
   if (check_red_black_invariants)
     {
       eassert (left_result.black_height == right_result.black_height);
-      eassert (node->parent != ITREE_NULL || !node->red || !node->parent->red);
+      eassert (node->parent == ITREE_NULL || !node->red || !node->parent->red);
     }
 
   result.size = 1 + left_result.size + right_result.size;