Fix condition checking for erasing the root

This commit is contained in:
2024-11-21 17:49:54 -08:00
parent d68f208d9b
commit 7166811387
+1 -2
View File
@@ -1885,10 +1885,9 @@ void downsize(Node *self, WriteContext *writeContext) {
// Precondition: self is not the root. May invalidate nodes along the search
// path to self. May invalidate children of self->parent. Returns a pointer to
// the node after self. Precondition: `self->entryPresent`
Node *erase(Node *self, WriteContext *writeContext, bool logical) {
++writeContext->accum.entries_erased;
assert(self->parent != nullptr);
assert(self->parent->parent != nullptr);
#if DEBUG_VERBOSE && !defined(NDEBUG)
fprintf(stderr, "Erase: %s\n", getSearchPathPrintable(self).c_str());