From 357b32e72877758e01462943829d75df30349b1c Mon Sep 17 00:00:00 2001 From: Gabriel Terwesten Date: Sat, 1 Oct 2022 00:43:57 +0200 Subject: [PATCH] Fix count of dicts with parent --- Fleece/Core/Dict.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Fleece/Core/Dict.cc b/Fleece/Core/Dict.cc index 87f7d66f..758f1b19 100644 --- a/Fleece/Core/Dict.cc +++ b/Fleece/Core/Dict.cc @@ -313,7 +313,7 @@ namespace fleece { namespace impl { if (_usuallyFalse(isMutable())) return heapDict()->count(); Array::impl imp(this); - if (_usuallyFalse(imp._count > 1 && isMagicParentKey(imp._first))) { + if (_usuallyFalse(imp._count >= 1 && isMagicParentKey(imp._first))) { // Dict has a parent; this makes counting much more expensive! uint32_t c = 0; for (iterator i(this); i; ++i)