Skip to content

Commit

Permalink
Merge pull request #75 from gregj1/master
Browse files Browse the repository at this point in the history
Update pyRF24Network.cpp, fix value returned from RF24Network.read(...)
  • Loading branch information
martin-mat committed Mar 8, 2016
2 parents 6f622f8 + 796c6d0 commit 6909ede
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions RPi/pyRF24Network/pyRF24Network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ bp::tuple read_wrap(RF24Network& ref, size_t maxlen)
char *buf = new char[maxlen+1];
RF24NetworkHeader header;

ref.read(header, buf, maxlen);
bp::object py_ba(bp::handle<>(PyByteArray_FromStringAndSize(buf, maxlen)));
uint16_t len = ref.read(header, buf, maxlen);
bp::object py_ba(bp::handle<>(PyByteArray_FromStringAndSize(buf, len)));
delete[] buf;

return bp::make_tuple(header, py_ba);
Expand Down

0 comments on commit 6909ede

Please sign in to comment.