Closed xPaw closed 12 months ago
https://github.com/vpenades/SharpGLTF/blob/9c6a4c0b4647a4478eba5abb69592b6708f79758/src/SharpGLTF.Core/Memory/MemoryImage.cs#L492-L493
When running in a debugger, I get a IndexOutOfRangeException here on the MemoryMarshal.Cast call. Should the data.Count check be changed from 12 to 48 because of all the integers in the struct?
data.Count
It works fine due to the try/catch in _IsKtx2Image.
you're right, It should not use a hardcoded value.
This class is used for basic validation, and at the time of writing I could not find nearly enough examples to work with...
https://github.com/vpenades/SharpGLTF/blob/9c6a4c0b4647a4478eba5abb69592b6708f79758/src/SharpGLTF.Core/Memory/MemoryImage.cs#L492-L493
When running in a debugger, I get a IndexOutOfRangeException here on the MemoryMarshal.Cast call. Should the
data.Count
check be changed from 12 to 48 because of all the integers in the struct?It works fine due to the try/catch in _IsKtx2Image.