shocker-0x15 / GfxExp

Sandbox for graphics paper implementation
Other
222 stars 19 forks source link

Out of bounds bug in Matrix4x4_T constructor #14

Closed Hurleyworks closed 9 months ago

Hurleyworks commented 9 months ago

LIne 2922 of basic_types.h

passed in array size is too small. Should be 16

CUDA_COMMON_FUNCTION CUDA_INLINE constexpr Matrix4x4_T(const F array[9]) :
    m00(array[0]), m10(array[1]), m20(array[2]), m30(array[3]),
    m01(array[4]), m11(array[5]), m21(array[6]), m31(array[7]),
    m02(array[8]), m12(array[9]), m22(array[10]), m32(array[11]),
    m03(array[12]), m13(array[13]), m23(array[14]), m33(array[15]) { }
shocker-0x15 commented 9 months ago

Good catch!