-
Notifications
You must be signed in to change notification settings - Fork 236
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
Java bindings: Invalid check for ASTC input swizzle parameter #969
Comments
Completely unrelated to the issue above, but as another ~"small thing that I'll probably fix soon": There currently is a constant |
Please fix these soon. We'll be making a release in early February, hopefully. |
@MarkCallow OK, given that this is only a small fix, I created a PR at #972 . (Otherwise, I would have added this to #968 , but it's hard to give an exact timeline for that. It might be that in that process, further "small fixes" might be necessary, but we can address them when they come up). Regarding the tl;dr: The main source of confusion here was probably that
So, strictly speaking, the documentation at https://github.khronos.org/KTX-Software/libktx/structktxAstcParams.html#a0d67004efa49e08a7f39f71c93286b0a that says
should/could include the hint that the default value is a |
(Just some sort of "TODO" for me, to keep track of this: )
The
KtxAstcParams#setInputSwizzle
function currently does a basic validity check for the given argument. This includes a check that the input only contains the charactersrgba01
. This breaks for the case where this value is initialized with its default value, which is achar[]
array that contains only0
values (in contrast to'0'
characters).For example:
This will currently throw an
IllegalArgumentException
.I'll try to fix this soon, either as a mini-PR, or as part of a larger PR.
The text was updated successfully, but these errors were encountered: