Skip to content

Commit 4547902

Browse files
authored
RegistrationSet: fix off by one error
`Entry.Next` should contain index+1 as assumed by the loop above. This fixes invalid registration behavior as noted by (this issue)[#160]
1 parent 7ef35be commit 4547902

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Storage/RegistrationSet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public void Add(Type type, string name, InternalRegistration registration)
7676
newEntry.RegisteredType = type;
7777
newEntry.Name = name;
7878
newEntry.Registration = registration;
79-
newEntry.Next = _buckets[bucket] - 1;
79+
newEntry.Next = _buckets[bucket];
8080
_buckets[bucket] = Count;
8181
}
8282

0 commit comments

Comments
 (0)