-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
BugSomething isn't workingSomething isn't workingHelp WantedExtra attention is neededExtra attention is needed
Description
In InterpolatedVar.cs, changed by 1348c82:
private int WrapRange(int i) {
return MathLib.Modulo(i, maxElement); // TODO: Why does -1 get passed here sometimes. We shouldn't have to change this to accomodate.
}This should actually be
return (i >= maxElement) ? (i - maxElement) : i;But for some reason, i coming in can sometimes be -1 when coming from here:
public ref T this[int i] {
get {
Assert(IsIdxValid(i));
i += firstElement;
i = WrapRange(i);
return ref elements![i];
}
}There is a check for this (IsIdxValid), but it's just an assert. This must be some bug in my implementation I would imagine, but further research is needed. For now, the modulo works with an occasional hiccup.
Metadata
Metadata
Assignees
Labels
BugSomething isn't workingSomething isn't workingHelp WantedExtra attention is neededExtra attention is needed