Skip to content

Crash when using poll_targets() #3

@GoogleCodeExporter

Description

@GoogleCodeExporter
With the snippet:

mod_targets = (
    pynfc.Modulation(nmt=nfc.NMT_ISO14443A, nbr=nfc.NBR_UNDEFINED),
    pynfc.Modulation(nmt=nfc.NMT_ISO14443B, nbr=nfc.NBR_UNDEFINED),
)

targets = nfc.poll_targets(mod_targets, 20, 2)

=> crash with:

Traceback (most recent call last):
  File "testnfc.py", line 33, in <module>
    targets = nfc.poll_targets(mod_targets, 20, 2)
  File "pynfc.py", line 566, in poll_targets
    return self.initiator_poll_targets(*args, **kwargs)
  File "pynfc.py", line 366, in initiator_poll_targets
    targtypes[i] = targetlist[i]
TypeError: '_ctypes.PyCArrayType' object does not support item assignment


Patch attached.

Original issue reported on code.google.com by txprog on 27 Sep 2011 at 11:07

Attachments:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions