Skip to content

Commit

Permalink
Fix count of dicts with parent
Browse files Browse the repository at this point in the history
  • Loading branch information
blaugold authored and snej committed Jul 19, 2023
1 parent 4e731e7 commit ccae083
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Fleece/Core/Dict.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ccae083

Please sign in to comment.