We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I get IndexOutOfRangeException while using IContextStore.Set. Looks like a bug in TypedDictionary
IndexOutOfRangeException
IContextStore.Set
TypedDictionary
bacause: private static int typeIndex = -1;
private static int typeIndex = -1;
when we use Add:
Add
public void Add<TKey>(TValue value) { lock (_lockObject) { var id = TypeKey<TKey>.Id; if (id >= _values.Length) { Array.Resize(ref _values, (int)(id * _growthFactor)); } _values[id] = value; } }
With very first use id becomes 0 and 0 * _growthFactor = 0 so _values[id] = value; fails.
id
0
0 * _growthFactor = 0
_values[id] = value;
The text was updated successfully, but these errors were encountered:
Fix array resize bug (asynkron#1908)
24ed0fc
Store array resize fix (#1908) (#1909)
6c504cf
* Fix array resize bug (#1908) * add store test class
Successfully merging a pull request may close this issue.
I get
IndexOutOfRangeException
while usingIContextStore.Set
. Looks like a bug inTypedDictionary
bacause:
private static int typeIndex = -1;
when we use
Add
:With very first use
id
becomes0
and0 * _growthFactor = 0
so_values[id] = value;
fails.The text was updated successfully, but these errors were encountered: