Coder Social home page Coder Social logo

Comments (4)

clausecker avatar clausecker commented on August 28, 2024

Thank you for reporting this issue. Currently investigating the problem and looking for a fix.

To your first point, the call to C.nfc_initiator_select_passive_target looks like this:

   n := C.nfc_initiator_select_passive_target(
            *d.d,
            C.nfc_modulation{C.nfc_modulation_type(m.Type), C.nfc_baud_rate(m.BaudRate)},
            (*C.uint8_t)(&initData[0]),
            C.size_t(len(initData)),
            &pnt)

where initData is the second parameter of (*Device).InitiatorSelectPassiveTarget. It's used twice in the appropriate places. Could you elaborate with what you mean by β€œthe second parameter of Device.InitiatorSelectPassiveTarget is not used?” There is a possible nil pointer dereference (which I'm fixing right now).

The second error is already fixed locally on my machine.

from nfc.

Lesterpig avatar Lesterpig commented on August 28, 2024

Thank you for your answer!

It's used twice in the appropriate places

My mistake, I had a "hotfix" version on my computer to handle the null case... Sorry for that.
There is still a tiny bug here you underlined with the null default value, or in case of empty slice.

from nfc.

clausecker avatar clausecker commented on August 28, 2024

Closing this. Please tell me if the issue persists and reopen if it does.

from nfc.

Lesterpig avatar Lesterpig commented on August 28, 2024

Now works like a charm, thank you very much :)

from nfc.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.