• Hi Gordon, I just came accross this question here and I've the same problem as user113695. I followed your advice, but I just get "garbage" data delivered in my C-function.
    I'm not the C guy, so I definitly doing something wrong here
    C-Function:

    // int find_sequence(int, int, int, int)
        int find_sequence(unsigned char* buffer, unsigned char* sequence, unsigned int sequence_length, unsigned int* params) {... return params[0]; }
    

    And in the code I'm calling it with

    const result = findNative.find_sequence(
                E.getAddressOf(this.buffer, true),
                E.getAddressOf(sequence, true),
                sequence.length,
                E.getAddressOf(new Uint32Array([
                    this.idx,
                    this.next,
                    offset,
                    stepping
                ]), true)
    );
    

    The first three parameters are working beautifully. No matter if I'm accessing params[0], params[1], params[2] or params[3], they all seem to have random values stored within.

    Could you help out Gordon?
    Thank you very much in advance.

About

Avatar for llakie @llakie started