You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.
during unit-testing, I found the Cube.setVar method fails, if the var index exceeds 15.
Let the index loop up to 32 and do some setVar/getVar checks, then getVar(15) will fail.
`public void setVar(int n, int v) {`
`long x = v; // cast narrow int v to long, otherwise v left shift will fail when n > 15.`
`//perform mask operation with long 3L not int 3 `
`cubes[n / 32] &= ~(3L << (n % 32) * 2);`
`cubes[n / 32] |= x << (n % 32) * 2;`
`}`
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi all,
during unit-testing, I found the Cube.setVar method fails, if the var index exceeds 15.
Let the index loop up to 32 and do some setVar/getVar checks, then getVar(15) will fail.
The text was updated successfully, but these errors were encountered: