Beef icon indicating copy to clipboard operation
Beef copied to clipboard

Indexing into a pointer does not work in some scenarios

Open jayrulez opened this issue 3 years ago • 0 comments

The code below fails:

    struct MyStruct1
    {
        public uint32[3] shaderIndices;
    }

    struct MyStruct2
    {
        public MyStruct1* shaderGroupDescs;
        public uint32 count;
    }

    public void Check(){
        MyStruct2 s2 = .();

        for(int i = 0; i < s2.count; i++){
            var count = s2.shaderGroupDescs[i].shaderIndices.Count;
        }
    }

jayrulez avatar Sep 24 '22 01:09 jayrulez