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

Buoyancy Crash as a result of IndexOutOfRange in SampleRepeat #12

Open
sandsalamand opened this issue Oct 19, 2023 · 0 comments
Open

Buoyancy Crash as a result of IndexOutOfRange in SampleRepeat #12

sandsalamand opened this issue Oct 19, 2023 · 0 comments

Comments

@sandsalamand
Copy link

static Vector4 SampleRepeat(Vector4[] source, int w, int h, int x, int y)
{
    x = x % w;
    y = y & h;

    return source[y * w + x];
}

source has a size of 65536 as a result of the 256 x 256 set in Size, and y * w = 65536

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

1 participant