Skip to content
New issue

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

The List.Item component fails for negative integers #14

Open
garciadelcastillo opened this issue Sep 22, 2021 · 1 comment
Open

The List.Item component fails for negative integers #14

garciadelcastillo opened this issue Sep 22, 2021 · 1 comment
Assignees

Comments

@garciadelcastillo
Copy link
Owner

When i < 1, the component fails with Wrapping active...

@lin-ycv
Copy link
Contributor

lin-ycv commented Sep 27, 2021

This should fix it.

if(W){
    int wrappedIndex = iIn % L.Count;
    if(wrappedIndex < 0) wrappedIndex = L.Count + wrap;
    item = L[wrappedIndex]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants