Skip to content

Commit

Permalink
Fix another bug with collection attributes that come at the end of an…
Browse files Browse the repository at this point in the history
… index segment
  • Loading branch information
halgari committed May 4, 2024
1 parent b7a5c73 commit 6c80a23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public Values<TValue, TLowLevel> Get(IEntity ent)
if (datom.A != dbId) continue;

var start = i;
while (i < segment.Count - 1 && segment[i].A == dbId)
while (i < segment.Count && segment[i].A == dbId)
{
i++;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public TValueType[] ToArray()
/// <inheritdoc />
public IEnumerator<TValueType> GetEnumerator()
{
for (var i = start; i < end; i++)
for (var i = 0; i < Count; i++)
{
yield return this[i];
}
Expand Down

0 comments on commit 6c80a23

Please sign in to comment.